フィルターのクリア

Replace Missing Data Points in Matrix with Interpolated Points

2 ビュー (過去 30 日間)
Jared Hubach
Jared Hubach 2018 年 2 月 5 日
編集済み: Stephen23 2018 年 2 月 5 日
Hello, I have a matrix Q, of size 12x13. In this matrix, I have only 18 points that have real collected data. This matrix is not a product, but is the most basic form of the data I have. Instead of displaying just the data I have with the average of all the data I collected in the background, I'd like to set the missing data points as interpolated values between the true data I have. I have read a couple questions similar to mine, but none have been the same. From theirs, it seems like the method to use would be to set the missing data points to NaN and replace them somehow using one of the interp functions, but I'm not sure which one (interp1, interp2, etc) to use or how to implement it. Any help would be greatly appreciated. Thank you in advance.
  1 件のコメント
Jared Hubach
Jared Hubach 2018 年 2 月 5 日
I looked into using the fillmissing function, but I don't believe it works with the version I'm using (2015b).

サインインしてコメントする。

回答 (1 件)

Stephen23
Stephen23 2018 年 2 月 5 日
編集済み: Stephen23 2018 年 2 月 5 日
Download John D'Errico's excellent FEX submission:
  2 件のコメント
Jared Hubach
Jared Hubach 2018 年 2 月 5 日
How exactly would I apply this code to my situation?
Stephen23
Stephen23 2018 年 2 月 5 日
編集済み: Stephen23 2018 年 2 月 5 日
" I have a matrix Q, of size 12x13"
That is a good start.
"In this matrix, I have only 18 points that have real collected data"
Ensure that the missing data are NaN.
Then simply call the function inpaint_nans just like it shows in its help:
Qnew = inpaint_nans(Q)

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeStatistics and Machine Learning Toolbox についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by