lundi 12 mars 2018

Find an index of a random number that not correspond a NaN using Matlab

I need the index of a random number in a array that is not a NaN using Matlab.

Ex: If a have A = [1 9 NaN 15 NaN 195 NaN NaN], i can have as an answer "1", "2" or "3", index of "1", "9" and "15" respectively.

How do I do that?

I can't order this array for reasons that not worth mentioning.

Thank you!




Aucun commentaire:

Enregistrer un commentaire