Borrar filtros
Borrar filtros

Magnitude plot over time

2 visualizaciones (últimos 30 días)
Drvoljub
Drvoljub el 30 de Jul. de 2011
Hello
I have a problem with a meshplot. I have a transfer function and I must make a magnitude plot. The problem is : I dont know how to make a mesh plot out of it. I attached a picture of the supposed result.
I know what a bode plot is but dont know how to produce this plot.
Regards Karlos

Respuestas (2)

the cyclist
the cyclist el 30 de Jul. de 2011
You don't give us any detail on what you have tried, or what your data look like, so it is not easy to help you. Here is about the simplest possible mesh you can make, slightly adapted from the MATLAB documentation for meshgrid. Does this help?
xvec = -2:0.2:2;
yvec = -2:0.2:2;
[x,y] = meshgrid(xvec,yvec);
z = x .* exp(-x.^2 - y.^2);
figure
mesh(x,y,z)

Drvoljub
Drvoljub el 30 de Jul. de 2011
hi
Yes I know the basics of the mesh plot
To tell you what I tried: X=[-1:0.5:3] Y=[0:10:40]
For example the transfer function
A=S/s+1
then I tried it with freqsp(A,w) w=[0:10:50]
and then I tried to mesh them together into the mesh command (X,Y,Z)
where Z=H=freqsp(A)
It didnt work.
The datas on the axis are : X axis = log(10) frequency (rad/s) -1:0.5:3 Y axis= time axis 0:10:40 Z axis= Magnitude (dB) -30:10:50
  1 comentario
the cyclist
the cyclist el 31 de Jul. de 2011
I don't understand your description completely.
Have you successfully defined three vectors, (X,Y,Z)?
Have you put those into meshgrid() to get three arrays that can be used in mesh()?
What error are you getting, specifically? It is not very helpful to just say, "It didn't work."
[It would be best if you posted the actual code you used, and the errors you are geting, instead of this semi-mathematical description.]

Iniciar sesión para comentar.

Categorías

Más información sobre 2-D and 3-D Plots en Help Center y File Exchange.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by