summaryrefslogtreecommitdiff
path: root/147/CH3/EX3.4/Example3_4.sce
blob: 6acae06aa2d1123ec303b6d9466dc61f70044ec4 (plain)
1
2
3
4
5
6
7
8
9
10
11
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);