Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- err=zeros(71,1);
- for N=1:71
- [ wsp_wielomianu, xa ] = aproksymacjaWiel(n,x,N); % aproksymacja wsp. 'x'.
- [ wsp_wielomianu, ya ] = aproksymacjaWiel(n,y,N); % aproksymacja wsp. 'x'.
- [ wsp_wielomianu, za ] = aproksymacjaWiel(n,z,N); % aproksymacja wsp. 'x'.
- diffx=0;
- diffy=0;
- diffz=0;
- for j=1:N
- diffx=diffx+(xa(j)-x(j)).^2;
- diffy=diffy+(ya(j)-y(j)).^2;
- diffz=diffz+(za(j)-z(j)).^2;
- end
- errx=sqrt(diffx)/N;
- erry=sqrt(diffy)/N;
- errz=sqrt(diffz)/N;
- err(N)=errx+erry+errz;
- end
- plot(err);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement