Question

I want to create a Matlab function of the maclaurin series of cos(x), which depends on...

I want to create a Matlab function of the maclaurin series of cos(x), which depends on x and tol, and plot the function for -Lx<=x<=Lx where Lx is a user specified input.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

p=input('Enter the value of Lx');
x=-p:0.1:p;
y=1 - (x.^2/factorial(2)) + (x.^4/factorial(4)) - (x.^6/factorial(6)) + (x.^8/ factorial(8))- (x.^10/factorial(10)) + (x.^12/factorial(12)) - (x.^14/factorial(14)) + (x.^16/ factorial(16));

plot(x,y)

Add a comment
Know the answer?
Add Answer to:
I want to create a Matlab function of the maclaurin series of cos(x), which depends on...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT