Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: "Not enough input arguments."?
Replies: 4   Last Post: Nov 27, 2012 2:16 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Lena

Posts: 1
Registered: 11/21/12
"Not enough input arguments."?
Posted: Nov 21, 2012 9:52 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

I am working on a problem that says: Calculate the 2nd and 3rd degree Taylor polynomials for the function f(x)=ln(1+x) about the point a=0 Plot these polynomials and the function on the interval -1<x<3

This is what I have so far. I thought it was right, but Matlab said "Not enough input arguments." What does that mean, and I how do I fix it?
>> figure(1);clf;
x=[-1:.01:3];
y=log*(1+x);
P2= x-(x^2/2)!;
P3= x-(x^2/2)+(x^3/3)!;
figure(1);clf;
plot(x,y,x,P2,'--',x,P3,'-.')
legend('log*(1+x)','P_2','P_3')
xlabel('x')
title('The function and the 2^{nd} and ^{rd} order Taylor Polynomials')
figure(2);clf
plot(x,abs(y-P2),x,abs(y-P3),'--')
legend('log*(1+x)-P_2|','log*(1+x)-P_3|')
xlabel('x')
title('Errors in the two Taylor Polynomials')

Thanks in advance!:)



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.