blob: bac1c9cc00640453137f77eed9ad7902c0f519ae (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
//Chapter-4, Example 4.9, Page 137
//=============================================================================
clc
clear
//CALCULATIONS
//for subdivision a
funcprot(0);
Max=40;
rms=max/sqrt(2);
mprintf("max and rms values are %d units and %2.2f units respectively\n",Max,rms);
//for subdivision b
//max=A+B
//rms=(A+B)/sqrt(2)
//for subdivision c
max1=sqrt(((10)^2)+((17.3)^2));
rms1=Max1/sqrt(2);
mprintf("max and rms values are %2.2f units and %2.2f units respectively",max1,rms1);
//note:in textbook for sub div (c) square root has not taken for maximum value computed
//=================================END OF PROGRAM==============================
|