diff options
author | priyanka | 2015-06-24 15:03:17 +0530 |
---|---|---|
committer | priyanka | 2015-06-24 15:03:17 +0530 |
commit | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch) | |
tree | ab291cffc65280e58ac82470ba63fbcca7805165 /24/DEPENDENCIES/Example4_2a.sce | |
download | Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2 Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip |
initial commit / add all books
Diffstat (limited to '24/DEPENDENCIES/Example4_2a.sce')
-rwxr-xr-x | 24/DEPENDENCIES/Example4_2a.sce | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/24/DEPENDENCIES/Example4_2a.sce b/24/DEPENDENCIES/Example4_2a.sce new file mode 100755 index 000000000..7906b6654 --- /dev/null +++ b/24/DEPENDENCIES/Example4_2a.sce @@ -0,0 +1,15 @@ +exec("degree_rad.sci",-1)
+
+//Given that
+t = poly(0,'t')
+x = -0.31 *t^2 + 7.2 *t +28 //in meter
+y = 0.22 *t^2 - 9.1 *t + 30 //in meter
+
+//Sample Problem 4-2a
+printf("**Sample Problem 4-2a**\n")
+time_t =15 //in sec
+position_r = [horner(x,time_t),horner(y,time_t)]
+printf("The position vector of the rabbit at t=15sec in meter is")
+disp(position_r)
+printf("The magnitude of the position vector is %f m\n", norm(position_r))
+printf("The angle made by the position vector with the x axis in degrees at the same time %f", rtod(atan(position_r(2)/position_r(1))))
\ No newline at end of file |