Hi! it is a matlab question. can you show me the steps of input and output? thank you so much!
1. Include input and output.
(a) Recall that a geometric sequence is a sequence of the form a, ar, ar^2, ar^3, ... At the MATLAB command prompt (not in an M-File), create a for-loop which prints the first 7 terms of this sequence when r = 1/3, a = 1. Include the output in your Word document.
Include input and output.
(b) Create a new M-File "geomSeq" with the loop above (be sure to test it to make sure it works!). Include the code for you M-File in your Word document.
Include input and output.
(c) Modify your M-File so that it accepts the value of r as an argument. Use this to find the first 7 terms of the geometric sequence when r = 1/4. Include the output and the command you used in your Word document.