summaryrefslogtreecommitdiff
path: root/23/CH5/EX5.1/Example_5_1.sce
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /23/CH5/EX5.1/Example_5_1.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/CH5/EX5.1/Example_5_1.sce')
-rwxr-xr-x23/CH5/EX5.1/Example_5_1.sce22
1 files changed, 22 insertions, 0 deletions
diff --git a/23/CH5/EX5.1/Example_5_1.sce b/23/CH5/EX5.1/Example_5_1.sce
new file mode 100755
index 000000000..55cf4b678
--- /dev/null
+++ b/23/CH5/EX5.1/Example_5_1.sce
@@ -0,0 +1,22 @@
+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 5.1
+//Caption : Program To Find the Heat discarded to the River
+
+//Given Values
+Tc=295;//K
+Th=585;//K
+W=800000;//KW
+n_max=1-(Tc/Th);
+n=approx(0.7*n_max,3)
+Qc=approx(((1-n)/n)*W,-2);
+disp('KW',Qc,'Heat required');
+
+//End \ No newline at end of file