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

1 commentaire

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

Connectez-vous pour commenter.

 Réponse acceptée

Matt J
Matt J le 17 Mar 2022

3 votes

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

Plus de réponses (0)

Catégories

Community Treasure Hunt

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

Start Hunting!

Translated by