curve fitting toolboxで近似した関数の出力
11 次查看(过去 30 天)
显示 更早的评论
采纳的回答
michio
2020-9-24
外部に出力するというのはどういうイメージでしょうか?
近似した関数というと例えば
load hahn1
f = fit( temp, thermex, 'rat23' )
whos f
Name Size Bytes Class Attributes
f 1x1 1924 cfit
で作られる f というオブジェクトを連想しておりますが、これを外部というと例えば係数情報を確認したいということでしょうか?もう少し具体的に記載いただけますと助かります。よろしくお願いいたします。
2 个评论
michio
2020-9-24
例えば
>> methods(f)
クラス cfit に対するメソッド:
argnames coeffnames dependnames fitoptions integrate numcoeffs probnames type
category coeffvalues differentiate formula islinear plot probvalues
cfit confint feval indepnames numargs predint setoptions
>> coeffvalues(f)
ans =
1.0e+06 *
0.2424 -5.8376 0.0618 0.0103 0.7789 2.1332
>> formula(f)
ans =
'(p1*x^2 + p2*x + p3) /
(x^3 + q1*x^2 + q2*x + q3)'
などで、係数を数値配列として、そして数式を文字列として取り出せますが、まとめて Excel に書き出せばできそうでしょうか?
更多回答(1 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

