increament in for loop does not working for impulse response
Mostrar comentarios más antiguos
g=input("enter the lowest range of damping factror: ");
wn=input("enter the highest range of natural frequency= ");
%forloop%
for c= g:1
n=[wn.^2 0 0];
d=[1 2.*c.*wn wn.^2 ];
sys=tf(n,d);
impulse(sys,'r')
hold on
g=g+0.1;
end
1 comentario
Tathagata Roy
el 14 de Mzo. de 2021
Respuestas (1)
Geoff Hayes
el 14 de Mzo. de 2021
Tathagata - if the damping constant/factor is given by g, and you want to increment this value by 0.1 on each iteration of the loop (up to one), then just do
for c= g:0.1:1
where you include the increment of 0.1.
Categorías
Más información sobre Dynamic System Models en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!