diff options
Diffstat (limited to '539/CH6/EX6.6.b')
-rwxr-xr-x | 539/CH6/EX6.6.b/Example_6_6b.sce | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/539/CH6/EX6.6.b/Example_6_6b.sce b/539/CH6/EX6.6.b/Example_6_6b.sce new file mode 100755 index 000000000..24b820563 --- /dev/null +++ b/539/CH6/EX6.6.b/Example_6_6b.sce @@ -0,0 +1,29 @@ +//Standard Deviation Computations
+
+clear;
+clc;
+
+printf("\tExample 6.6b\n");
+
+//First and Last point are arbitary to plot the required 4 points
+n=[0 1 2 3 4 5];
+TS=[510 520 512 515 522 525];
+
+i=2;
+TSmean=0;
+
+for i=2:5
+ TSmean=TSmean+(TS(i)/4);
+end
+
+//Standard Deviation
+j=0;
+std=0;
+
+for i=2:5
+ std=std+((TS(i)-TSmean)^2/(4-1));
+end
+
+printf("\nStandard deviation is %.1f MPa\n",sqrt(std));
+
+//End
\ No newline at end of file |