Hello, this question has been already answered on chegg. Although I am not able
ID: 3027647 • Letter: H
Question
Hello,
this question has been already answered on chegg. Although I am not able to find the solution with Matlab.
I would appreciate if you could send me a picture of how you entered it in Matlab.
Explanation / Answer
Solution :
function furtureworth P=input('Enter initial incestment (dollars):'); i=input('Enter the interest rate (decimal):'); n=input('Enter the number of years:');
x = 0:n;
if (i>=0) F=P*(1+i).^x; y = [x;F]; end
if(i<0)||(P<0) fprintf('sorry,the value of i is not valid for calculation '); end
fprintf(' year future worth '); fprintf('%5d %14.2f ',y)
------------------------------------------------------------------------------
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.