Question: Include input and output. Consider the series 1 + 1 r + 1 r 2 + 1 r 3 + . . . + 1

Include input and output.
Consider the series 1+1r +1r2+1r3+...+1rn. Implement a calculation for this series in a new M-file, calling the function "mysum". The function should take two inputs, r and n. Copy the code from your new M-file into your document.
Use the new command, mysum, to calculate the values when r =4 and n =10.

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 Programming Questions!