how can I set axis's tick or scale like photo.. help plz,,

조회 수: 3 (최근 30일)
James
James 2020년 5월 31일
댓글: Star Strider 2020년 5월 31일
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])
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

채택된 답변

Star Strider
Star Strider 2020년 5월 31일
편집: Star Strider 2020년 5월 31일
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])
See Axis Properties for more options.
EDIT —
Added plot image —
  댓글 수: 2
James
James 2020년 5월 31일
Thank you so much!! now I'm going to search for other problems!!
Star Strider
Star Strider 2020년 5월 31일
As always, my pleasure!

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

David Hill
David Hill 2020년 5월 31일
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;
  댓글 수: 1
James
James 2020년 5월 31일
Thankyou so much for answering my question!! sorry for I choosing another.... but I got another useful command from you. Thanks

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Grid Lines, Tick Values, and Labels에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by