diff options
Diffstat (limited to '1460/CH2/EX2.1/2_1.sce')
-rwxr-xr-x | 1460/CH2/EX2.1/2_1.sce | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/1460/CH2/EX2.1/2_1.sce b/1460/CH2/EX2.1/2_1.sce new file mode 100755 index 000000000..e282ab8f5 --- /dev/null +++ b/1460/CH2/EX2.1/2_1.sce @@ -0,0 +1,11 @@ +clc
+//initialization of variables
+k=20 //lb/in
+x=3 //in
+//calculations
+function [y]=fun(x)
+ y=k*x
+endfunction
+w=intg(0,3,fun)
+//results
+printf("Work done = %d in-lb",w)
|