diff options
Diffstat (limited to '331/CH3/EX3.12/Example_3_12.sce')
-rwxr-xr-x | 331/CH3/EX3.12/Example_3_12.sce | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/331/CH3/EX3.12/Example_3_12.sce b/331/CH3/EX3.12/Example_3_12.sce new file mode 100755 index 000000000..6d639f22d --- /dev/null +++ b/331/CH3/EX3.12/Example_3_12.sce @@ -0,0 +1,31 @@ +//Caption: Geometric Mean +//Example3.12 +//Page50 +clear; +clc; +GrowthRate = input('Growth Rate in percentage ='); +X = 100+GrowthRate; //Demand of the product +N = length(X) +Geometric_Mean = 1; +for i = 1:N + Geometric_Mean = Geometric_Mean*X(i); +end +Geometric_Mean = Geometric_Mean^(1/N); +R = Geometric_Mean-100; +disp('Year period is =',N,'The average growth rate of demand during') +disp(R,'R = ') +disp('percentage') +//Result +//Growth Rate in percentage = [20,30,35,40]; +// +// The average growth rate of demand during +// +// 4. +// +// Year period is = +// +// R = +// +// 31.037802 +// +// percentage
\ No newline at end of file |