Consider a userdefined function that calculates an amount of

Consider a user-defined function that calculates an amount of money, invested saving account for one year. Your function takes two inputs: the initial balance and the annual interest rate. The function returns two outputs: the interest and the final balance. In the box below, write a function file, interest. m. consisting of the following variables. the initial balance, in dollars the annual interest rate, in percentage the interest, in dollars the final balance, in dollars Let\'s consider an example. Suppose S200 is invested in an account that generates 6% interest. Because 6% of $200 is $12.00. the balance after one year is $200 $12 = $212.00. How could we use the interest function-along with the input values 200 and 6-to perform the calculation just described? Your command line must be consistent with the response, shown below.

Solution

intrest (i ,xf) = f(xo, r)

i = xo * r;

xf = xo + i;

intrest (i ,xf) = f(xo, r)

if ~exsit(\'arg1\',\'xo\')
arg1 = \'200\';
end

if ~exsit(\'arg2\',\'r\')
arg2 = \'6\';
end

i = xo * r;

xf = xo + i;

 Consider a user-defined function that calculates an amount of money, invested saving account for one year. Your function takes two inputs: the initial balance

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site