logarithmic x-Axis for a function handle

조회 수: 3 (최근 30일)
Karsten Gros
Karsten Gros 2017년 2월 8일
댓글: Star Strider 2017년 2월 9일
Hi, I got a question regarding the plot of two function handles. I have this function handles:
The first one: n=@(R) 1./(3.*pi.*R_e.^3.*R_dach).*(R_e./R_dach).^(-2/3).*(R.*(R_e-R_stern))./(R-R_stern).*(A_2.*R+A_3)./(A_2.*R_e+A_3).*exp(B_1®+B_2®);
The second one: N=@(R) 1./(3.*pi.*R.^2.*R_dach).*(R_e./R_dach).^(-2/3);
And I'd like to plot both function handles, but the x-axis should be logarithmic. n® should go from R_stern to R_e and N® should go from R_e to R_dach. They have the same value for R=R_e (N(R_e)=n(R_e). So something like
fplot(n, [R_stern R_e])
hold on
fplot(N, [R_e R_dach])
hold off
But with a logarithmic x-Axis.
Could anyone help me with the solution of my problem? I attached the .m file, so feel free to try out :) Thanks in advance and best regards, Karsten

채택된 답변

Star Strider
Star Strider 2017년 2월 8일
Try this:
fplot(n, [R_stern R_e])
hold on
fplot(N, [R_e R_dach])
hold off
set(gca, 'XScale','log')
  댓글 수: 2
Karsten Gros
Karsten Gros 2017년 2월 9일
Hi, Thanks for your answer, worked perfectly. Best regards, Karsten
Star Strider
Star Strider 2017년 2월 9일
My pleasure.
If my Answer helped you solve your problem, please Accept it!

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Correlation and Convolution에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by