summaryrefslogtreecommitdiff
path: root/1415/CH1/EX1.3.3
diff options
context:
space:
mode:
Diffstat (limited to '1415/CH1/EX1.3.3')
-rw-r--r--1415/CH1/EX1.3.3/ex3.jpgbin0 -> 32139 bytes
-rw-r--r--1415/CH1/EX1.3.3/ex3.sce24
2 files changed, 24 insertions, 0 deletions
diff --git a/1415/CH1/EX1.3.3/ex3.jpg b/1415/CH1/EX1.3.3/ex3.jpg
new file mode 100644
index 000000000..962b3114c
--- /dev/null
+++ b/1415/CH1/EX1.3.3/ex3.jpg
Binary files differ
diff --git a/1415/CH1/EX1.3.3/ex3.sce b/1415/CH1/EX1.3.3/ex3.sce
new file mode 100644
index 000000000..a274c10f7
--- /dev/null
+++ b/1415/CH1/EX1.3.3/ex3.sce
@@ -0,0 +1,24 @@
+//Example 3 Page 82
+clc
+clear
+C1=25000//assigning C1 value
+x1=30//Assigning x1 value
+C2=30000//assigning C2 value
+x2=40//assigning x2 value
+m=((C2-C1)/(x2-x1));//Finding the slopw
+disp(m,'the slope is')//displaying the slope value
+b=C1-m*x1;//Finding the intercept value
+disp(b,'the intercept b is')//dislaying the intercept value
+//therefore the function is C(x)
+function y=C(x)//function C(x)
+ y=500*x+10000
+endfunction
+
+x=[0 10 20 30 40 50]//assigning values of x for graph
+y=C(x)//function calling
+disp(x,'x:')//displaying x
+disp(y,'y:')//displaying y
+plot(x,y,'blue')//plotting graph in blue colour
+xtitle('','Number of Refrigerators','Cost(dollars)')//naming the axes
+
+