How can I change the value of x and y axes?

조회 수: 4 (최근 30일)
MATTIA
MATTIA 2023년 4월 30일
답변: Adam Danz 2023년 4월 30일
Hello everyone, sorry for my english, I created a meshgrid with values between 0 and pi/2, but when I plot with the command mesh it shows me 0, 0.5, 1, 1.5. I would like to obtain values along the axes expressed in degrees for example 0,15,30,45,60,75,90. How can I do? Thanks for the replies.
ps: a=alfa , b=beta.

채택된 답변

Adam Danz
Adam Danz 2023년 4월 30일
You must be using mesh(Z)
If you want to specify the x and y coordinates, use mesh(X,Y,Z).
If x and y are in radians, convert them to degrees.
xdeg = rad2deg(x);
ydeg = rad2deg(y);
mesh(xdeg, ydeg, z)

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by