Interpolation incase on nan
1 次查看(过去 30 天)
显示 更早的评论
I have a data which includes nans and I used interp1 to interpolate the data points, but error message is popping up which says it's not appropriate .Can anyone help me solving this?
0 个评论
采纳的回答
Jan
2013-4-4
编辑:Jan
2013-4-4
No, currently I can't help. Please post some relevant example data (by editing the original question, not as comment or answer), such that we can see, which of the inputs contains the NaNs and where.
Then an answer will be easy (or impossible): Most likely the NaNs can be simply removed before the interpolation.
[EDITED after your first comment]
Had = [1 3 4 6 nan nan 20 ];
time = [1 2 3 4 5 6 7];
good = ~isnan(Had);
had2 = [ 2.5 5 17]
time2= interp1(Had(good), time(good)', had2);
2 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Interpolation of 2-D Selections in 3-D Grids 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!