summaryrefslogtreecommitdiff
path: root/542
diff options
context:
space:
mode:
authorprashantsinalkar2017-10-10 12:38:01 +0530
committerprashantsinalkar2017-10-10 12:38:01 +0530
commitf35ea80659b6a49d1bb2ce1d7d002583f3f40947 (patch)
treeeb72842d800ac1233e9d890e020eac5fd41b0b1b /542
parent7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 (diff)
downloadScilab-TBC-Uploads-f35ea80659b6a49d1bb2ce1d7d002583f3f40947.tar.gz
Scilab-TBC-Uploads-f35ea80659b6a49d1bb2ce1d7d002583f3f40947.tar.bz2
Scilab-TBC-Uploads-f35ea80659b6a49d1bb2ce1d7d002583f3f40947.zip
updated the code
Diffstat (limited to '542')
-rwxr-xr-x542/CH1/EX1.3/Example_1_3.sci57
1 files changed, 27 insertions, 30 deletions
diff --git a/542/CH1/EX1.3/Example_1_3.sci b/542/CH1/EX1.3/Example_1_3.sci
index 06c11b05f..5fe9e3fb5 100755
--- a/542/CH1/EX1.3/Example_1_3.sci
+++ b/542/CH1/EX1.3/Example_1_3.sci
@@ -1,30 +1,27 @@
-clear all;
-clc;
-printf("\n Example 1.3");
-p=0.20;//components analysed represents 20 percent of the mixture by mass
-//for a completely unmixed system
-so=p*(1-p);
-//for a completely random mixture :
-n=100;//Each of the sample removed contains 100 particles
-sr=p*(1-p)/n;
-s=[0.025 0.006 0.015 0.018 0.019];
-time_secs=[30 60 90 120 150];
-printf("\n degree of mixing is :\n")
-function[b]=degree_of_mixing()
-for i=1:5
- b(i)=(so-s(i))/(so-sr);
- disp(b(i));//b is the degree of mixing
-end
- return b;
-funcprot(0)
-endfunction
-plot2d(time_secs,degree_of_mixing(),style=3)
-xtitle("degree of mixing curve","time_secs","degree_of_mixing")
-//plot of sample variance vs time(secs)
-xset('window',1)
-plot2d(time_secs,s,style=2)
-xtitle("sample variance curve","time_secs","sample variance")
-//from the graph the maxima is at 60 secs
-
-
-
+clear;
+clc;
+printf("\n Example 1.3");
+p=0.20;//components analysed represents 20 percent of the mixture by mass
+//for a completely unmixed system
+so=p*(1-p);
+//for a completely random mixture :
+n=100;//Each of the sample removed contains 100 particles
+sr=p*(1-p)/n;
+s=[0.025 0.006 0.015 0.018 0.019];
+time_secs=[30 60 90 120 150];
+printf("\n degree of mixing is :\n")
+function[b]=degree_of_mixing()
+for i=1:5
+ b(i)=(so-s(i))/(so-sr);
+ disp(b(i));//b is the degree of mixing
+end
+ return b;
+funcprot(0)
+endfunction
+plot2d(time_secs,degree_of_mixing(),style=3)
+xtitle("degree of mixing curve","time_secs","degree_of_mixing")
+//plot of sample variance vs time(secs)
+xset('window',1)
+plot2d(time_secs,s,style=2)
+xtitle("sample variance curve","time_secs","sample variance")
+//from the graph the maxima is at 60 secs \ No newline at end of file