diff options
author | prashantsinalkar | 2017-10-10 12:27:19 +0530 |
---|---|---|
committer | prashantsinalkar | 2017-10-10 12:27:19 +0530 |
commit | 7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 (patch) | |
tree | dbb9e3ddb5fc829e7c5c7e6be99b2c4ba356132c /1415/CH1/EX1.3.5/ex5.sci | |
parent | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (diff) | |
download | Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.gz Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.bz2 Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.zip |
initial commit / add all books
Diffstat (limited to '1415/CH1/EX1.3.5/ex5.sci')
-rw-r--r-- | 1415/CH1/EX1.3.5/ex5.sci | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/1415/CH1/EX1.3.5/ex5.sci b/1415/CH1/EX1.3.5/ex5.sci new file mode 100644 index 000000000..e097bdffd --- /dev/null +++ b/1415/CH1/EX1.3.5/ex5.sci @@ -0,0 +1,23 @@ +//Example 6 Page 86
+clc
+clear
+
+disp('a)')
+s2=530//Assigning s2 values
+s1=50//Assigning s1 values
+t2=8//Assigning t2 values
+t1=0//Assigning t1 values
+m=((s2-s1)/(t2-t1));//calculating m value
+disp(m,'the slope is:')//displaying m value
+b=s1-m*t1;//calculating b value
+disp(b,'the intercept value is')//displaying b value
+mprintf( "So, %dt+%d million units ",m,b);//printing the s equation
+
+disp('b)')
+mprintf( "So, %dt+%d million units\n ",m,b);//printing the s equation
+//since value of s=440
+s=440//Assigning s values
+m=60//Assigning m values
+b=50//Assigning b values
+t=(s-b)/60;//calculting time
+mprintf("\nAnnual sales of mobile portable devices will reah 440 millions when s=440 or t=%f years",t);//displaying the time in years
|