近似を続けることができません

4 views (last 30 days)
shunya hara
shunya hara on 6 Nov 2020
Commented: michio on 6 Nov 2020
for 構文を用いて、三次元行列の要素に対して連続で近似を行っています。
近似の最中に以下の文言が表示され、近似が途中で終了してしまいます。
このエラーが出てもエラーが出たところのみをスキップして近似を継続する方法はありますか?
エラー: fit>iFit (line 348)
Inf がモデル関数で計算されました。近似を続けることはできません。
係数の上限と下限を使用するか、範囲を狭めてみてください。
エラー: fit (line 116)
[fitobj, goodness, output, convmsg] = iFit( xdatain, ydatain, fittypeobj, ...
  2 Comments
shunya hara
shunya hara on 6 Nov 2020
ありがとうございます!!
おかげさまで解決しました!!!
michio
michio on 6 Nov 2020
よかったです!

Sign in to comment.

Accepted Answer

michio
michio on 6 Nov 2020
try/catch の構文を使うのは如何でしょうか?
for ii=1:N
try
% (フィッティング処理)
catch ME
% エラーが起きたときに何か必要な処理があれば記載
% 例:エラーが発生したときの ii を表示するのであれば
ii
end
end

More Answers (0)

Categories

Find more on Curve Fitting Toolbox 入門 in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!