summaryrefslogtreecommitdiff
path: root/3792/CH2/EX2.12/Ex2_12.sce
diff options
context:
space:
mode:
authorprashantsinalkar2017-10-10 12:27:19 +0530
committerprashantsinalkar2017-10-10 12:27:19 +0530
commit7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 (patch)
treedbb9e3ddb5fc829e7c5c7e6be99b2c4ba356132c /3792/CH2/EX2.12/Ex2_12.sce
parentb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (diff)
downloadScilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.gz
Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.bz2
Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.zip
initial commit / add all books
Diffstat (limited to '3792/CH2/EX2.12/Ex2_12.sce')
-rw-r--r--3792/CH2/EX2.12/Ex2_12.sce32
1 files changed, 32 insertions, 0 deletions
diff --git a/3792/CH2/EX2.12/Ex2_12.sce b/3792/CH2/EX2.12/Ex2_12.sce
new file mode 100644
index 000000000..3e360eda7
--- /dev/null
+++ b/3792/CH2/EX2.12/Ex2_12.sce
@@ -0,0 +1,32 @@
+// Example 2_12
+clc;funcprot(0);
+// Given data
+v_0=250;// km/h
+theta_i=15;// degree
+a=0.8;// m/s^2
+t=60;// seconds
+s_0=0;// m
+x=3000;// m
+
+// Calculation
+// (a)
+v_0=v_0/3.6;// m/s
+v=v_0+(a*t);// m/s
+s=s_0+(v_0*t)+((1/2)*a*t^2);// m
+y=s*cosd(theta_i);// m
+theta=atand(y/x);// degree
+r=sqrt(x.^2+y.^2);// m
+v_xy=v*cosd(theta_i);// m/s
+v_r=v_xy*sind(theta);// m/s
+v_theta=v_xy*cosd(theta);// m/s
+thetadot=v_theta/r;// rad/s
+zdot=v*sind(theta_i);// m/s
+v_z=zdot;// m/s
+// (b)
+z=y*tand(theta_i);// m
+phi=atand(z/r);// degree
+R=sqrt(r^2+z^2);// m
+v_R=(v_r*cosd(phi))+(zdot*sind(phi));// m/s
+v_phi=(zdot*(cosd(phi)))-(v_r*sind(phi));// m/s
+phidot=v_phi/R;// m/s
+printf("\n(a)v_r=%2.1f m/s \n thetadot=%1.2e rad/s \n zdot=v_z=%2.1f m/s \n(b)v_R=%3.1f m/s \n thetadot=%1.2e rad/s \n phidot=%1.3e rad/s",v_r,thetadot,zdot,v_R,thetadot,phidot);