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

댓글 수: 1

Torsten
Torsten 2022년 3월 17일
By removing them before calling the fit function.

댓글을 달려면 로그인하십시오.

 채택된 답변

Matt J
Matt J 2022년 3월 17일

3 개 추천

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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Interpolation에 대해 자세히 알아보기

질문:

2022년 3월 17일

댓글:

2022년 3월 20일

Community Treasure Hunt

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

Start Hunting!

Translated by