how to obtain the last index of a column vector containg a set of given values?
조회 수: 2 (최근 30일)
이전 댓글 표시
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.
댓글 수: 0
답변 (1개)
Image Analyst
2014년 2월 15일
The index of the last element of "time" or of any 1-D array is "end" or length(time).
댓글 수: 3
Image Analyst
2014년 2월 15일
Make it easy for us to help you. Read this. http://www.mathworks.com/matlabcentral/answers/6200-tutorial-how-to-ask-a-question-on-answers-and-get-a-fast-answer As of now, I can't do anything to help you.
참고 항목
카테고리
Help Center 및 File Exchange에서 Matrix Indexing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!