summaryrefslogtreecommitdiff
path: root/23/CH1/EX1.3/Example_1_3.sce
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /23/CH1/EX1.3/Example_1_3.sce
downloadScilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip
initial commit / add all books
Diffstat (limited to '23/CH1/EX1.3/Example_1_3.sce')
-rwxr-xr-x23/CH1/EX1.3/Example_1_3.sce26
1 files changed, 26 insertions, 0 deletions
diff --git a/23/CH1/EX1.3/Example_1_3.sce b/23/CH1/EX1.3/Example_1_3.sce
new file mode 100755
index 000000000..4d0243399
--- /dev/null
+++ b/23/CH1/EX1.3/Example_1_3.sce
@@ -0,0 +1,26 @@
+clear;
+clc;
+
+//To find Approx Value
+function[A]=approx(V,n)
+ A=round(V*10^n)/10^n;//V-Value n-To what place
+ funcprot(0)
+endfunction
+
+//Example 1.3
+//Caption : Program To Find Pressure in a Manometer
+
+//Given Values
+
+T=300.15;//Temp=300.15K(27`C)
+h=60.5*(10^-2);//Height=60.5cm
+rho=13530;//Density(Kg/m^3)
+g=9.784;//Acceleration of gravity(m/s^2)
+
+//Solution
+
+P=approx(h*rho*g,0);
+disp('KPa',P/1000,'Pressure in KPa');
+disp('bar',P/100000,'Pressure in bar');
+
+//End \ No newline at end of file