How can I change the limits of axis in 3d plot
9 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponses (1)
Walter Roberson
le 8 Fév 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 commentaires
Voir également
Catégories
En savoir plus sur Data Distribution Plots dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!