필터 지우기
필터 지우기

how to change basic signal of rectangular funtion to laplace transform

조회 수: 4 (최근 30일)
Mya
Mya 2022년 1월 31일
댓글: Mya 2022년 1월 31일
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
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.
Mya
Mya 2022년 1월 31일
ouh alrite and tq for guiding me ;)

댓글을 달려면 로그인하십시오.

채택된 답변

Walter Roberson
Walter Roberson 2022년 1월 31일
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 = 

추가 답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by