Question: Use matlab and write script: Consider the following equation 6a + 9b + 20c = n The variables a, b, and c can be thought

Use matlab and write script:

Consider the following equation

6a + 9b + 20c = n

The variables a, b, and c can be thought of as the number (non-negative integers) of 6s, 9s, and 20s in n. Note that for a given n, there might be one, multiple, or no solutions for a, b, and c. For example,

n = 15 a = 1 and b = 1 and c = 0

n = 16 no solution

n = 24 a = 4 and b = 0 and c = 0: a = 1 and b = 2 and c = 0

Write a Matlab script that asks the user for n and calculates the solutions of this equation, i.e. how many 6s, 9s, and 20s fit in n. Show that this equation has exact solutions for n = 50, 51, 52, 53, 54, and 55 and list all the combinations of a, b, and c for each case.

Deliverables: Your Matlab script and its outputs with the given values of n.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!