Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- >function MetNewt(a,b,n,x1,F,P)
- -->
- --> for i=2:n
- --> x(i)=x(i-1)-(F(x(i-1)))/(P(x(i-1)))
- --> end
- -->
- -->endfunction
- -->a=-2.5; b=-1.5; // przedzia� chwilowo pomijam
- -->n=10;
- -->x1=0; // punkt pocz�tkowy
- -->x=1; //dla funkcji F(1)
- -->deff('[y]=F(x)','y=x^3+x^2-3*x-3'); // definicja funkcji
- -->P=derivative(F,x); // pochodna funkcji F(x), czyli F(1)
- -->z=MetNewt(a,b,n,x1,F,P)
- !--error 21
- Nieprawid�owy indeks.
- at line 4 of function MetNewt called by :
- z=MetNewt(a,b,n,x1,F,P)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement