Question: Please help me with problem 2 and problem 3(a& b) using MATLAB code only. MATLAB code only. MATLAB code only. MATLAB code only. MATLAB code

Please help me with problem 2 and problem 3(a&b) using MATLAB codePlease help me with problem 2 and problem 3(a&b) using MATLAB code only. MATLAB code only. MATLAB code only. MATLAB code only. MATLAB code only. MATLAB code only. MATLAB code only. Thank you very much

2. Write a function "GenMatrix" that takes two inputs of m and n as numbers of rows and columns, and create a matrix for which each element is equal to ij ( i is row and j is column) using two "for loops". If m=3,n=4, for example, the following matrix will be created: A=1232463694812 3. If your savings account is giving you r=1% interest per year, and interest is added to your account on a monthly basis, as: A=p(1+12r)M in which p=10000 is the amount you put into your account, M is number of months, and A is your accumulated savings (with interests). a. Write a "for loop" that calculates your savings amount at the end of each month, for 120 months. Plot your savings versus months. b. Using a "while loop", how many months does it take for your savings to reach 20000 dollars? Will you be alive to enjoy that amount

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!