フィルターのクリア

How to construct an anonymous function from the result of the fit command?

5 ビュー (過去 30 日間)
Federico
Federico 2013 年 12 月 26 日
コメント済み: Federico 2013 年 12 月 26 日
Hello,
I am trying to do some data fitting with a data set that resembles an air bubble when plotted. I am trying to obtain a function that defines the surface of the bubble. The following result perfectly fits the the profile.
f=fit(x(:,2),-y(:,1),'smoothingspline')
plot(f,x(:,2),-y(:,1)
Now, I would like to create an anonymous function. How can I accomplish this?
Thank you.

採用された回答

Matt J
Matt J 2013 年 12 月 26 日
編集済み: Matt J 2013 年 12 月 26 日
anonf=@(x) f(x)
  1 件のコメント
Federico
Federico 2013 年 12 月 26 日
Wow, that was easy enough. Thank you very much!

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

その他の回答 (1 件)

The Matlab Spot
The Matlab Spot 2013 年 12 月 26 日
編集済み: The Matlab Spot 2013 年 12 月 26 日
Refer Anonymous Functions for further details

カテゴリ

Help Center および File ExchangeGet Started with Curve Fitting Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by