how to plot signal (t,g) by using editor window command?

1 Ansicht (letzte 30 Tage)
Perwez Alam
Perwez Alam am 4 Dez. 2018
Beantwortet: KSSV am 4 Dez. 2018
How to write editer command to plot (t,g)
Please help me.
thanking You

Antworten (1)

KSSV
KSSV am 4 Dez. 2018
w = 2*pi*50 ;
phi = 10*pi/180 ;
t = 0:0.1:60 ;
N = 3 ;
g = zeros(N,length(t));
for n = 1:N
g(n,:) = sin((2*n+1)*w*t+phi)/(2*n+1) ;
end
% do the sum
g = 1/2+sum(g,1) ;
plot(t,g)

Kategorien

Mehr zu MATLAB 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!

Translated by