How can I change the limits of axis in 3d plot

8 Ansichten (letzte 30 Tage)
Ar90
Ar90 am 8 Feb. 2020
Beantwortet: Walter Roberson am 8 Feb. 2020
I wrote this code but I couldn't change the axis limits, do you know what is the problem?
w3=20:100;
t=0:0.01:5;
w=107.36; d=150; x=410;
[a,b]=meshgrid(w3,t);
z=abs((4.22E-3)*(a.^2)./((w.^2)-(a.^2))).*sin((pi*d)/820).*sin((pi*x)/820).*sin(a.*b);
figure
sa=surf(a,b,z, 'EdgeColor','none')
aH = ancestor(sa,'axes')
set(aH,'yLim',[20 100])

Antworten (1)

Walter Roberson
Walter Roberson am 8 Feb. 2020
Setting the limit is working. However, your b values are only in the range 0 to 5, and you are setting the limit to be 20 to 100, and there is no data to show for that range of values. 20 to 100 is what you would want for your a values, not for your b values.

Kategorien

Mehr zu Data Distribution Plots finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by