How can I change the limits of axis in 3d plot
10 views (last 30 days)
Show older comments
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])
0 Comments
Answers (1)
Walter Roberson
on 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.
0 Comments
See Also
Categories
Find more on Data Distribution Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!