フィルターのクリア

replace "inf " with a value

4 ビュー (過去 30 日間)
maryam
maryam 2015 年 2 月 14 日
コメント済み: maryam 2015 年 2 月 14 日
hi all. i have a 8192*300 matrix. some of its elements are "inf". i want to replace these values with average of cells before and after them. could you give me an advice? thank you very much
  3 件のコメント
per isakson
per isakson 2015 年 2 月 14 日
編集済み: per isakson 2015 年 2 月 14 日
maryam
maryam 2015 年 2 月 14 日
Dear Stephen, thank you for your reply. one cell from each side is enough. but i don't have any idea about your next questions! :(

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

回答 (1 件)

Stephen23
Stephen23 2015 年 2 月 14 日
編集済み: Stephen23 2015 年 2 月 14 日
Use TriScatteredInterp or scatteredInterpolant (newer MATLAB versions). You can pass these vectors of your data points excluding the Inf values, and then they will interpolate new points at the grid locations that you specify.
  1 件のコメント
maryam
maryam 2015 年 2 月 14 日
thank you very much, i will test this method. but should i have matlab 2014b? my current version is 2012b.

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

カテゴリ

Help Center および File ExchangeLogical についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by