関数fitでデータの近似曲線を求め方を教えてください
    10 visualizzazioni (ultimi 30 giorni)
  
       Mostra commenti meno recenti
    
データの近似曲線を求めたくて関数fitを使用しました。データはx1とy1の2次元グラフです。fitを使用した時、x1,y1をdouble型にしてから近似曲線の種類fitTypeを指定しました。実行すると、次のようなエラーがでました。
関数 'fit' の呼び出し内に、不足している引数または正しくない引数データ型がないかを確認してください。
どうすれば正しく実行できるか教えてください。
コード
p=fit(x1,y1,'exp1');
0 Commenti
Risposte (1)
  michio
    
 il 7 Ago 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 Commenti
Vedere anche
Categorie
				Scopri di più su 線形回帰と非線形回帰 in Help Center e File Exchange
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!