Using fit function ignoring NaN

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

1 Commento

Torsten
Torsten il 17 Mar 2022
By removing them before calling the fit function.

Accedi per commentare.

 Risposta accettata

Matt J
Matt J il 17 Mar 2022
include=~isnan(y);
fobj = fit(x(include),y(include),fitType)

Più risposte (0)

Richiesto:

il 17 Mar 2022

Commentato:

il 20 Mar 2022

Community Treasure Hunt

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

Start Hunting!

Translated by