필터 지우기
필터 지우기

Magnitude plot over time

조회 수: 2 (최근 30일)
Drvoljub
Drvoljub 2011년 7월 30일
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

답변 (2개)

the cyclist
the cyclist 2011년 7월 30일
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 2011년 7월 30일
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
the cyclist
the cyclist 2011년 7월 31일
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.]

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

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by