When I integrate a constant over Tp I should get the constant but I don't?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Gary Armstrong
am 13 Jan. 2019
Kommentiert: Stephan
am 14 Jan. 2019
I'm attempting to find the average value but have come up against a error.
When I integrate a constant over Tp I should get the constant but I don't?
>> T= 2*pi
>> ao=(1/T)*int(100.0,t,0,T) %Integrate the constant 100 over Tp to find the average
ao =
(143354028480566475*pi)/4503599627370496
0 Kommentare
Akzeptierte Antwort
Stephan
am 13 Jan. 2019
Bearbeitet: Stephan
am 13 Jan. 2019
2 Kommentare
Stephan
am 14 Jan. 2019
syms t n
T= 2*sym('pi'); % T= Period
w0=1; % Fundamental anguler freg
n=1:10; % n=1 fundamental, n>1 harmonics
v =100+100*cos(w0*t);
a0= 1/T*int(v,t,0,T)
an= 2/T*int(v*cos(n*w0*t),t,0,T)
bn= 2/T*int(v*sin(n*w0*t),t,0,T)
Weitere Antworten (1)
Walter Roberson
am 14 Jan. 2019
syms t
T = 2 * sym('pi'); %use symbolic pi instead of numeric pi
ao=(1/T)*int(100.0,t,0,T)
2 Kommentare
Siehe auch
Kategorien
Mehr zu Formula Manipulation and Simplification finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!