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

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

2 Kommentare

shunya hara
shunya hara am 6 Nov. 2020
ありがとうございます!!
おかげさまで解決しました!!!
michio
michio am 6 Nov. 2020
よかったです!

Melden Sie sich an, um zu kommentieren.

 Akzeptierte Antwort

michio
michio am 6 Nov. 2020

0 Stimmen

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

Weitere Antworten (0)

Kategorien

Mehr zu Curve Fitting Toolbox 入門 finden Sie in Hilfe-Center und File Exchange

Produkte

Gefragt:

am 6 Nov. 2020

Kommentiert:

am 6 Nov. 2020

Community Treasure Hunt

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

Start Hunting!