Question: 3 . Develop a MATLAB function to compute the Maclaurin series expansion for the cosine function given as: c o s x = n =

3. Develop a MATLAB function to compute the Maclaurin series expansion for the cosine function given
as:
cosx=n=0(-1)n(2n)!x2n=1-x22!+x44!-x66!+cdots
Test your program for: =3(60) and =73(420).
The first line of the function should be:
function [fx,ea,et,iter]= Lastname_Cos(x,es, maxit)
Note: Pattern your function according to the sample in Fig. 4.2. Be sure to calculate the et value also.
4. the velocity of a rocket might be described by:
v(t)={10t2-5t,0t8624-3t,8t1636t+12(t-16)2,16t262136e-0.1(t-26),t>260otherwise
First, develop a function file (using the if ... else structure) with the first line:
function v= Lastname_Vel (t) to compute velocity as a function of time for each interval.
Then, write a script named as Lastname_Call_Vel that uses the function to generate a plot of v
versus t for t=-5 to 50. Label your plot accordingly.
Hint: You will need a loop to create the corresponding values of t and v, where v is based on the
function you created.
Note: Do NOT use the built-in piecewise function for this problem.
Also, ensure that each MATLAB file is named appropriately, starting with your last name.

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!