Question: MATLAB CODE Write a function file named myseries.m that takes one scalar input parameter, x, and returns the approximate sum of the series shown below:

 MATLAB CODE Write a function file named myseries.m that takes one

MATLAB CODE

Write a function file named myseries.m that takes one scalar input parameter, x, and returns the approximate sum of the series shown below: 2n+1 (-1)m 2n +1 n 0 Your function should use a while loop and add each term in the series as long as the absolute value of the next term is greater than 0.000001. Note that we're not computing any error! NOTE You do not need to write a help comment (H-lines) for this function. Also write a test script names myseriesTest.m that uses the display command to display the value that is returned from the myseries function with an input parameter of x - 0.3

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!