필터 지우기
필터 지우기

How can I plot laplace transformed functions?

조회 수: 44 (최근 30일)
Murloc50
Murloc50 2021년 11월 28일
댓글: Star Strider 2021년 11월 29일
How can I plot laplace transformed functions? Since the function should be imaginary I can not use fplot, can I? For example, how would I plot this:
syms x
f = sin(x);
l = laplace(f);
Thanks in advance.
  댓글 수: 2
Paul
Paul 2021년 11월 29일
syms x
f = sin(x);
l = laplace(f)
l = 
l is a function of complex variable, s. So it depend on what kind of plot you want to make.
Murloc50
Murloc50 2021년 11월 29일
편집: Murloc50 2021년 11월 29일
I think a 3D Plot would be best since it is a function with a complex and real part, wouldnt it? Since I am no expert, what kind of plot would you recommend? Or does this depend on the function laplace() returns?

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

채택된 답변

Star Strider
Star Strider 2021년 11월 29일
It might be easier to do this outside the Symbolic Math Toolbox.
That aside, try this —
syms x s js rs sigma omega
f = sin(x);
l = laplace(f)
l = 
lc(sigma,omega) = subs(l,{s},{sigma+1j*omega}) % Define As Complex, With Complex Arguments
lc(sigma, omega) = 
figure
fsurf(lc, [ -0.1 0 -2*pi 2*pi ], 'MeshDensity',125)
xlabel('\sigma')
ylabel('\omega')
set(gca, 'YTick',[-2*pi : pi/2 : 2*pi], 'YTickLabel',compose('%.1f\\pi',(-2:0.5:2)))
axis([-0.1 0.1 -2*pi 2*pi])
Plotting it in two dimensions is of course an option, however the function has three dimensions (,amplitude) so a three-dimensional plot is appropriate. The two complex-conjugate poles at are clearly visible.
Not perfect, however the best fsurf can do here with this function!
.
  댓글 수: 2
Murloc50
Murloc50 2021년 11월 29일
Thanks! This helped a lot.
Star Strider
Star Strider 2021년 11월 29일
As always, my pleasure!
.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Calculus에 대해 자세히 알아보기

태그

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by