From b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b Mon Sep 17 00:00:00 2001 From: priyanka Date: Wed, 24 Jun 2015 15:03:17 +0530 Subject: initial commit / add all books --- 42/CH2/EX2.1/sadiku_2_1.sce | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 42/CH2/EX2.1/sadiku_2_1.sce (limited to '42/CH2/EX2.1/sadiku_2_1.sce') diff --git a/42/CH2/EX2.1/sadiku_2_1.sce b/42/CH2/EX2.1/sadiku_2_1.sce new file mode 100755 index 000000000..fa4b595b5 --- /dev/null +++ b/42/CH2/EX2.1/sadiku_2_1.sce @@ -0,0 +1,12 @@ +clear; +clc; +format('v',7); +x=-2;y=6;z=3; +r=(x^2+y^2)^.5; +B=atand(y/x); +R=sqrt(x^2+y^2+z^2); +X=atand(r/z); +disp([r B z ],'Cylindrical acordinate of P:'); +disp([R X B],'Spherical Cordinate of P:'); +A=[cosd(B) sind(B) 0;-sind(B) cosd(B) 0;0 0 1]*[y;x+z;0]; +disp (A,'A in cylindrical cordinates') \ No newline at end of file -- cgit