Effacer les filtres
Effacer les filtres

replace "inf " with a value

15 vues (au cours des 30 derniers jours)
maryam
maryam le 14 Fév 2015
Commenté : maryam le 14 Fév 2015
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 commentaires
per isakson
per isakson le 14 Fév 2015
Modifié(e) : per isakson le 14 Fév 2015
maryam
maryam le 14 Fév 2015
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! :(

Connectez-vous pour commenter.

Réponses (1)

Stephen23
Stephen23 le 14 Fév 2015
Modifié(e) : Stephen23 le 14 Fév 2015
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 commentaire
maryam
maryam le 14 Fév 2015
thank you very much, i will test this method. but should i have matlab 2014b? my current version is 2012b.

Connectez-vous pour commenter.

Catégories

En savoir plus sur Logical dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by