summaryrefslogtreecommitdiff
path: root/1322/CH21/EX21.2
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /1322/CH21/EX21.2
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 '1322/CH21/EX21.2')
-rwxr-xr-x1322/CH21/EX21.2/185ex1.sce21
1 files changed, 21 insertions, 0 deletions
diff --git a/1322/CH21/EX21.2/185ex1.sce b/1322/CH21/EX21.2/185ex1.sce
new file mode 100755
index 000000000..c8d1b8fda
--- /dev/null
+++ b/1322/CH21/EX21.2/185ex1.sce
@@ -0,0 +1,21 @@
+
+//voltmeters example
+clc;
+clear;
+close;
+clf();
+C=[1.9 2.75 3.8 4.8 5.8];
+K=[5.75 8.3 11.2 14 16.8];
+//C and K are connected by the law of the form K=mC+b
+plot2d4(C,K,3);
+plot(3.4,10,'r.pentagram');
+plot(5.3,15.5,'r.pentagram');
+xtitle("voltmeters graph","C","K");
+xgrid();
+legend("K=mC+b","POINTS A,B",2);
+//substituting A,B points in K=mC+b,we get
+//10=3.4m+b ------->equ(1) ; 15.5=5.3m+b ------->equ(2)
+//substracting
+m=(10-15.5)/(3.4-5.3);
+b=10-(3.4*m);
+mprintf("the law is: \n K=%fC+%f",m,b)