関数fitでデータの近似曲線を求め方を教えてください
26 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
データの近似曲線を求めたくて関数fitを使用しました。データはx1とy1の2次元グラフです。fitを使用した時、x1,y1をdouble型にしてから近似曲線の種類fitTypeを指定しました。実行すると、次のようなエラーがでました。
関数 'fit' の呼び出し内に、不足している引数または正しくない引数データ型がないかを確認してください。
どうすれば正しく実行できるか教えてください。
コード
p=fit(x1,y1,'exp1');
0 commentaires
Réponses (1)
michio
le 7 Août 2020
x = rand(10,1);
y = rand(10,1);
p = fit(x,y,'exp1')
p =
一般モデル Exp1:
p(x) = a*exp(b*x)
係数 (95% の信頼限界):
a = 0.3623 (0.05425, 0.6704)
b = 0.9283 (-0.5022, 2.359)
ということで、使い方自体に問題はなさそうです。
入力されている変数 x1, y1 のデータ型など今一度ご確認頂けますか?
2 commentaires
Voir également
Catégories
En savoir plus sur Curve Fitting Toolbox dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!