Filter löschen
Filter löschen

how to change basic signal of rectangular funtion to laplace transform

4 Ansichten (letzte 30 Tage)
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
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.
Mya
Mya am 31 Jan. 2022
ouh alrite and tq for guiding me ;)

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Walter Roberson
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)
rectangular_pulse = 
%now let us work according to theory:
sympref('HeavisideAtOrigin', 1)
ans = 
RP = rewrite(rectangular_pulse, 'heaviside')
RP = 
LRP = laplace(RP)
LRP = 
%but actually we could just work directly on the rectangularPulse object
laplace(rectangular_pulse)
ans = 

Weitere Antworten (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by