Question
Use matlab and write script: Please use n = input('Enter the value of n :') not the function command. Consider the following equation 6a +
Use matlab and write script:
Please use n = input('Enter the value of n :') not the function command.
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started