Hi,
how can I use the fit function ignoring the NaN values in my y vector?
Thanks

1 Kommentar

Torsten
Torsten am 17 Mär. 2022
By removing them before calling the fit function.

Melden Sie sich an, um zu kommentieren.

 Akzeptierte Antwort

Matt J
Matt J am 17 Mär. 2022

3 Stimmen

include=~isnan(y);
fobj = fit(x(include),y(include),fitType)

Weitere Antworten (0)

Kategorien

Gefragt:

am 17 Mär. 2022

Kommentiert:

am 20 Mär. 2022

Community Treasure Hunt

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

Start Hunting!

Translated by