How do I plot a 3d graph for a transfer function in MATLAB?

In summary, the conversation is about how to produce a 3d graph for a transfer function in MATLAB. The person is asking for help and clarifying their question, and the expert suggests using either a surface or mesh plot, possibly with the meshgrid option. The expert also provides links for more information on each type of plot.
  • #1
rlspin
6
0
Matlab 3d graph help

I'm pretty new to MATLAB so I am sorry if this is a stupid question but how do i produce a 3d graph for a transfer function?
Just for arguments sake, a simple TF like this:
2
-------------
s^2 + 2 s + 3
 
Last edited:
Physics news on Phys.org
  • #2
Well, what are you trying to plot? Bode plots are sometimes plotted, but 3D? I suppose you could plot some kind of contour plot against complex values of s...
 
  • #3
Sorry, that was a bad example. Say I had this transfer function instead:
2
-------------
s^2 + 2Xs + 3

and I had various values for X. I understand how i would plot the various curves on one graph in 2D but is there a way to 3d graph for the same results?
 
  • #4

1. How do I create a 3D graph in MATLAB?

To create a 3D graph in MATLAB, you can use the "plot3" function. This function allows you to plot x, y, and z coordinates on a three-dimensional graph. You can also customize the appearance of your graph using various options such as color, line style, and marker shape.

2. Can I plot data points on a 3D graph in MATLAB?

Yes, you can plot data points on a 3D graph in MATLAB by using the "scatter3" function. This function allows you to specify x, y, and z coordinates for each data point and also customize the appearance of the points.

3. How do I label the axes on a 3D graph in MATLAB?

To label the axes on a 3D graph in MATLAB, you can use the "xlabel," "ylabel," and "zlabel" functions. These functions allow you to specify the label for each axis and also customize the appearance of the labels.

4. Can I add a title to my 3D graph in MATLAB?

Yes, you can add a title to your 3D graph in MATLAB by using the "title" function. This function allows you to specify the title of your graph and also customize the appearance of the title.

5. How do I save my 3D graph in MATLAB as an image file?

To save your 3D graph in MATLAB as an image file, you can use the "saveas" function. This function allows you to specify the file format (such as PNG or JPEG) and the file name for your graph. You can also adjust the resolution and size of the image before saving it.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
786
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
11
Views
2K
Back
Top