matlab matrix

Thank you, but i have one more question. I have 1000 files (studentIDs) every file has two parameters ( subject1 , subject2 ) every parameter look like
31.07.2011 5
31.07.2011 3
31.07.2011 5
31.07.2011 2
31.07.2011 5
I need to write a script which can find "5" in subject1, and show me day and StudentID )

댓글 수: 2

KSSV
KSSV 2012년 1월 11일
You can use "find" to get the position of your required number.
Ex:
K = [1 3; 4 5; 7 8];
[i j] = find(K==5);
Now i , j gives you the position of 5 in K.
Andrew Newell
Andrew Newell 2012년 1월 11일
This is a continuation of http://www.mathworks.com/matlabcentral/answers/25771-matlab-matrix. If you are finished with that question, you should accept an answer.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

도움말 센터File Exchange에서 Logical에 대해 자세히 알아보기

태그

질문:

2012년 1월 11일

Community Treasure Hunt

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

Start Hunting!

Translated by