Using fit function ignoring NaN

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

1 comentario

Torsten
Torsten el 17 de Mzo. de 2022
By removing them before calling the fit function.

Iniciar sesión para comentar.

 Respuesta aceptada

Matt J
Matt J el 17 de Mzo. de 2022
include=~isnan(y);
fobj = fit(x(include),y(include),fitType)

Más respuestas (0)

Categorías

Preguntada:

el 17 de Mzo. de 2022

Comentada:

el 20 de Mzo. de 2022

Community Treasure Hunt

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

Start Hunting!

Translated by