how to change basic signal of rectangular funtion to laplace transform
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Mya
am 31 Jan. 2022
Kommentiert: Mya
am 31 Jan. 2022
fprintf('Please choose any type of signal below.\n1. Impulse\n2. Step function\n3. DC Source\n4. Signum function\n5. Rising exponent function\n6. Cosine function\n7. Sine function\n8. Square function\n9. Triangular function\n10. Symmetrical decaying exponent function')
s = input('\nSignal number: ');
switch(s)
case 8
t =-3:0.01:5;
c=input('amplitude:');
A = input('Amplitude scale value:');
B = input('Amplitude shift value: ');
a = input('Time scale value: ');
b = input('Time shift value: ');
y=c*((t>=-1)&(t<=1));
figtitle ='rectangular pulse';
subplot(3,1,1)
plot(t,y,'b')
hold on
plot((t./a)+b,A*y+B,'r')
hold off
title(figtitle)
xlabel('Time')
ylabel('Amplitude')
grid on
% adjust limits to create padding
xlim(xlim + [-2 1]*1.2)
ylim(ylim + [-2 1]*1.2)
subplot (3,1,2)
x = -3:0.01:3;
d = c.*sinc((x*2)./2);
plot(x, d)
ylim([-c-2 c+2])
grid on
title('fourier transform');
ylabel('F(w)');
xlabel('w');
%how to subplot laplace transform of rectangular function
3 Kommentare
Walter Roberson
am 31 Jan. 2022
After you do the laplace(), use subs() to replace the start and end positions and height with specific values, leaving t as symbolic. Then fplot() the results, making sure to pass in the bounds you want to plot over.
Akzeptierte Antwort
Walter Roberson
am 31 Jan. 2022
syms pulse_height pulse_start pulse_end t positive
rectangular_pulse = pulse_height * rectangularPulse(pulse_start, pulse_end, t)
%now let us work according to theory:
sympref('HeavisideAtOrigin', 1)
RP = rewrite(rectangular_pulse, 'heaviside')
LRP = laplace(RP)
%but actually we could just work directly on the rectangularPulse object
laplace(rectangular_pulse)
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Transforms 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!