From 7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 Mon Sep 17 00:00:00 2001 From: prashantsinalkar Date: Tue, 10 Oct 2017 12:27:19 +0530 Subject: initial commit / add all books --- 1415/CH1/EX1.2.5/1.jpg | Bin 0 -> 25841 bytes 1415/CH1/EX1.2.5/3.jpg | Bin 0 -> 25993 bytes 1415/CH1/EX1.2.5/ex5.sce | 54 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 54 insertions(+) create mode 100644 1415/CH1/EX1.2.5/1.jpg create mode 100644 1415/CH1/EX1.2.5/3.jpg create mode 100644 1415/CH1/EX1.2.5/ex5.sce (limited to '1415/CH1/EX1.2.5') diff --git a/1415/CH1/EX1.2.5/1.jpg b/1415/CH1/EX1.2.5/1.jpg new file mode 100644 index 000000000..6b4c340eb Binary files /dev/null and b/1415/CH1/EX1.2.5/1.jpg differ diff --git a/1415/CH1/EX1.2.5/3.jpg b/1415/CH1/EX1.2.5/3.jpg new file mode 100644 index 000000000..aa3aabf00 Binary files /dev/null and b/1415/CH1/EX1.2.5/3.jpg differ diff --git a/1415/CH1/EX1.2.5/ex5.sce b/1415/CH1/EX1.2.5/ex5.sce new file mode 100644 index 000000000..7323e28ce --- /dev/null +++ b/1415/CH1/EX1.2.5/ex5.sce @@ -0,0 +1,54 @@ +//Example 5 Page 64 +clc +clear +//function for linear model +function y=r1(t) +y=57*t+607 +endfunction +//function for quadratic model +function y=r2(t) + y=-9*t^2+110*t+560 +endfunction +//function for exponential model +function y=r3(t) + y=608*(1.08)^t +endfunction +//function for logistic model +function y=r4(t) + y=930/(1+0.67*(1.7)^-t) +endfunction + +disp('a)') +t=([0 1 2 3 4 5 6])//assigning values of t +y1=r1(t)//function caling r1(t) +disp(t) +disp(y1)//displaying values of y1 +y2=r2(t)//function calling r2(t) +disp(t) +disp(y2)//displaying values of y2 +y3=r3(t)//function calling r3 +disp(t) +disp(y3)//displaying value sof y3 +y4=r4(t)//function calling r4 +disp(y3)//displaying y4 values +plot(6,1000,t,y1,'red')//plotting linear graph +xtitle('Linear Model','x','y')//given title and other labes +scf//setting current graphic window +plot(6,1000,t,y2,'blue')//plotting qudratic graph +xtitle('quadratic','x','y')//setting labels +scf//setting current graphic window +plot(6,1000,t,y3,'blue')//plotting exponential graph +xtitle('Exponential Model','x','y')//setting labels +scf//setting current graphic window +plot(6,1000,t,y2,'blue')//plotting logistic graph +xtitle('Logistic Model','x','y')//setting labels + +disp('b)') +t=10//assigning value of t +y1=r2(t)//function calling r2 +disp(y1,'Quadratic Model for 2010')//displaying result +y2=r4(t)//function calling r4 +disp(y2,'Logistic Model for 2010')//displaying result + + + -- cgit