![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/307063/image.png)
how can I set axis's tick or scale like photo.. help plz,,
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
CD = @(Re) 24./Re+(2.6*Re/5)./(1+(Re/5).^1.52)+(0.411*(Re/263000).^(-7.94))./(1+(Re/263000).^(-8))+(0.25*Re/10^6)./(1+Re/10^6);
fplot(CD, [0.1 1000000])
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/306987/image.png)
it is my result but I want like under. what should I use which command to get under.I know axis scale is a problem. I dont know which command need. please help me
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/306991/image.png)
0 commentaires
Réponse acceptée
Star Strider
le 31 Mai 2020
Modifié(e) : Star Strider
le 31 Mai 2020
Add these lines:
grid
set(gca, 'XScale','log', 'YScale','log', 'YLim',[0.01 100])
so the complete code is now:
CD = @(Re) 24./Re+(2.6*Re/5)./(1+(Re/5).^1.52)+(0.411*(Re/263000).^(-7.94))./(1+(Re/263000).^(-8))+(0.25*Re/10^6)./(1+Re/10^6);
fplot(CD, [0.1 1000000])
grid
set(gca, 'XScale','log', 'YScale','log', 'YLim',[0.01 100])
EDIT —
Added plot image —
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/307063/image.png)
2 commentaires
Plus de réponses (1)
David Hill
le 31 Mai 2020
CD = @(Re) 24./Re+(2.6*Re/5)./(1+(Re/5).^1.52)+(0.411*(Re/263000).^(-7.94))./(1+(Re/263000).^(-8))+(0.25*Re/10^6)./(1+Re/10^6);
re=.1:.1:10000;
semilogx(re,CD(re));
grid on;
Voir également
Catégories
En savoir plus sur Graphics Object Programming 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!