Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- clc;
- clear all;
- x=0;
- y=0;
- r=0;
- a=0;
- b=0;
- y1=0;
- y2=0;
- x1=0;
- x2=0;
- x=input('Podaj wspolrzedna x: ');
- y=input('Podaj wspolrzedna y: ');
- r=sqrt(((x-0)^2)+((y-0)^2))
- a=input('Podaj kat przesuniecia: ');
- b=x/r;
- b=y/r;
- x1=cosd(b);
- y1=sind(b);
- x2=x1*cosd(a)-y1*sind(a);
- y2=x1*sind(a)+y1*cosd(a);
- A=[x2,y2]
- clc;
- clear all;
- x=input('Podaj x: ');
- y=input('Podaj y: ');
- z=input('Podaj z: ');
- r=sqrt((x^2)+(y^2)+(z^2));
- a=acos(z/r)
- cos(f)=(x/(sqrt(x^2+y^2)))
- sin(f)=(y/(sqrt(x^2+y^2)))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement