Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function Taylor(n)
- x = linspace (0,2*pi,200);
- z = 0;
- fact = 1;
- z = x;
- potencia = x;
- signo = 1
- for i=3:2:n
- fact = i*(i-1)*fact;
- potencia = potencia.*x.*x;
- signo = signo*(-1);
- z =z+signo*potencia/fact;
- end
- plot (x,z)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement