how to change basic signal of rectangular funtion to laplace transform
조회 수: 4 (최근 30일)
이전 댓글 표시
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
Walter Roberson
2022년 1월 31일
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.
채택된 답변
Walter Roberson
2022년 1월 31일
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
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Transforms에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!