2
$\begingroup$

Let's say I have a function called $f(t)$ in time domain as:

$$f(t) = \exp(-3t)\cos(5t)$$

And the Laplace transform of this function call it $F(s)$ becomes:

$$F(s)=\frac{(s + 3)}{(s + 3)^2 + 25}$$

I want to plot the 3D plot of $\lvert F(s)\rvert$ as a surface above the $s$-plane.

I couldn't find any script. I have the version R2014a of MATLAB. How is this done in MATLAB? Something similar to this plot:

enter image description here

$\endgroup$
4
  • $\begingroup$ Look into meshgrid, there are plenty of examples of 3D plots using MATLAB and this function that should help you $\endgroup$ Commented Apr 29, 2017 at 16:22
  • $\begingroup$ I couldn't find a single one in hours of search, can you provide me a link if you know where they have an example how they plot Laplace transform above the s plane? Specifically Laplace transform's magnitude above the s plane. $\endgroup$
    – user16307
    Commented Apr 29, 2017 at 16:23
  • $\begingroup$ I do have such an example- I will put it up as an answer for you when I get home later tonight $\endgroup$ Commented Apr 29, 2017 at 18:25
  • $\begingroup$ mathworks.com/help/matlab/learn_matlab/… $\endgroup$ Commented Apr 29, 2017 at 21:13

1 Answer 1

4
$\begingroup$
[X,Y] = meshgrid(-10:.1:10);
s=X+j*Y;
Z= abs((s+3)./((s+3).^2+25));
mesh(X,Y,Z)

3d plot

$\endgroup$
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.