Is it possible to plot a curve fitting object in semi log scale

조회 수: 3 (최근 30일)
Yoav Romach
Yoav Romach 2014년 3월 1일
댓글: Yoav Romach 2014년 3월 2일
Hey,
Long story short, I have a curve fitting session that I want to plot in semi log scale (x). I generated the code from the curve fitting session and tried several things, all of them failed:
  • Trying to replace "plot" by "semilogx" returns:
Error using semilogx
Conversion to double from cfit is not possible.
  • Trying to use "set(get(h,'Parent'),'YScale','log');" returned almost the same error:
Error using set
Conversion to double from cell is not possible.
So other than extracting the function/coefficients and recreating it myself, is there any other way?

채택된 답변

Matt J
Matt J 2014년 3월 2일
편집: Matt J 2014년 3월 2일
So other than extracting the function/coefficients and recreating it myself, is there any other way?
Not clear what delimits "extracting" for you. You can always evaluate the fit over some domain using the fit object's feval() method and then plot the evalauted data using any conventional plot command. To my mind, that doesn't involve recreating the function in any way, just evaluating it directly.
  댓글 수: 1
Yoav Romach
Yoav Romach 2014년 3월 2일
You're right. I was thinking of extracting the coefficients and recreating the function myself.
However this is obviously dumb as I can simply use feval().
Thanks!

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Fit Postprocessing에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by