Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

You want to buy three kinds of vitamin supplements that will give you enough amo

ID: 3538694 • Letter: Y

Question


You want to buy three kinds of vitamin supplements that will give you enough amount of your desire. Supplement I has 1 mg of vitamin A, 3 mg of vitamin B, and 4 mg of vitamin C. Supplement II has 2, 3, and 5 of each types of vitamin respectively while Supplement III has 3, 0, and 3, respectively. You want to have 11 mg of vitamin A, 9 mg of vitamin B, and 20 mg of vitamin C. How many of each supplement will precisely provide these amounts of vitamins?

Solve this in MATLAB using the Jacobi's method.


Explanation / Answer

function[J]=jacobFD(f,x,delx) [m n]=size(x); for j=1:m xx=x; xx(j)=x(j)+delx; J(:,j) = (f(xx)-f(x))/delx; end;

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote