diff options
Diffstat (limited to '147/CH3/EX3.4/Example3_4.sce')
-rw-r--r-- | 147/CH3/EX3.4/Example3_4.sce | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/147/CH3/EX3.4/Example3_4.sce b/147/CH3/EX3.4/Example3_4.sce new file mode 100644 index 000000000..6acae06aa --- /dev/null +++ b/147/CH3/EX3.4/Example3_4.sce @@ -0,0 +1,12 @@ +close();
+clear;
+clc;
+//time period 'T'
+T = 0.01; //s
+//voltage as a function of time 'v'
+function volt = v(t)
+ volt = (10^4*t)^2;
+endfunction
+//RMS value of voltage 'V'
+V = sqrt(1/T * intg(0,T,v)); //V
+mprintf("RMS value of voltage, V = %f V",V);
\ No newline at end of file |