Reproducing the "Evaluate" function from "basic fitting" GUI directly in code

1 回表示 (過去 30 日間)
Yanick
Yanick 2013 年 1 月 15 日
Hello Community,
When using the "basic fitting" tool, one has the opportunity once the "fitting" done to evaluate/estimate a value at certain points. I was only able to reproduce this until the plotting part. I cannot figure out how to reproduce the "Evaluate" function programmatically so that I can estimate the value of certain points and use them in my code. The only way I can achieve this for now, is through the GUI i.e from the Figure window's main menu: "tools >> basic fitting" (see picture link) http://i.stack.imgur.com/u6u5v.png
I am not sure I am making myself clear enough, but please do not hesitate to ask if you need more information.
Thank you

採用された回答

Sarah Wait Zaranek
Sarah Wait Zaranek 2013 年 1 月 16 日
You can use the polyfit function to fit your data programatically. You can then use polyval to evaluate the polynomial at a given point.
  1 件のコメント
Yanick
Yanick 2013 年 1 月 16 日
Thank you Sarah,
I never realised I could use polyval to achieve that result.
Yanick

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLinear and Nonlinear Regression についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by