Pulse function with matlab
18 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I need to do the follwing, but i am relatively new so i want to make sure it's right
Generate a pulse function with a pulse width 1 second as an input function, x(t), and use the same exponential decay function as impulse response function, h(t). Using MATLAB to calculate the output of the system y(t).
t = 0 : 1/1000 : 1;
u=0*t;
h=exp(-t/2);
y = rectpuls(t);
b=conv(h,y);
plot(b)
ohh i am lost
8 comentarios
Paulo Silva
el 25 de Feb. de 2011
clc;clear;clf
T=1000; %value in miliseconds, 1000->1 second, 100->0.1 second
t = 1/T : 1/T : 3;
Amp=1 %amplitude of the pulse
u=[zeros(1,T) Amp*ones(1,numel(t)/3) zeros(1,T)];
h=exp(-t/2);
b=conv(u,h);
c=conv(h,b);
hold on
plot(c./1000000)
plot(u,'r')
plot(h,'g')
legend('output','pulse','exponential decay')
Respuestas (1)
voona srikar
el 4 de Dic. de 2022
t = 0 : 1/1000 : 1;
u=0*t;
h=exp(-t/2);
y = rectpuls(t);
b=conv(h,y);
plot(b)
0 comentarios
Ver también
Categorías
Más información sobre Switches and Breakers en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!