how to obtain the last index of a column vector containg a set of given values?

1 vue (au cours des 30 derniers jours)
Abin Krishnan
Abin Krishnan le 15 Fév 2014
Commenté : Image Analyst le 15 Fév 2014
I have a column vector which shows time. I'm trying to find out the index using the find command. My input command was. >> s=find(time==0.1000); >> s
s =
Empty matrix: 0-by-1
The vector contains three values of 0.1000.I want the index of the last value. But it shows the above error message.

Réponses (1)

Image Analyst
Image Analyst le 15 Fév 2014
The index of the last element of "time" or of any 1-D array is "end" or length(time).
  3 commentaires
Abin Krishnan
Abin Krishnan le 15 Fév 2014
I want the index of not the last element.i have used find command but still <= expression is not working

Connectez-vous pour commenter.

Catégories

En savoir plus sur Matrix Indexing dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by