function.docx

(10 KB) Pobierz

function [zr]=G(c,z)

-->zr=z(2)-c(1)-c(2)*z(1)-c(3)*z(1)^2-c(4)*z(1)^3

-->function [zr]=G(c,z)

-->zr=z(2)-c(1)-c(2)*z(1)-c(3)*z(1)^2-c(4)*z(1)^3

-->endfunction

-->x=[0.2  0.3 0.4 0.5 0.6 0.7 0.8 0.9 1]

-->y=[50  48  47 46 45 43 42 39 38]

-->z=[x;y]

-->c=[0;0;0;0]

-->[a,S]=datalift(G,Z,c)

 

 

>plot2d(x,y,-4);

 

-->t=1.32:0.1:2.25;

 

-->Ptc=a(1)+a(2)*t+a(3)*t^2+a(4)*t^3;

 

-->plot2d(t,Ptc);

 

-->plot2d(x,y,-4);

 

-->t=0.2;0.01;1;

 

-->Ptc=a(1)+a(2)*t+a(3)*t^2+a(4)*t^3;

 

-->plot2d(t,Ptc);

Zgłoś jeśli naruszono regulamin