필터 지우기
필터 지우기

how to find the position in an array

조회 수: 2 (최근 30일)
mohan gopal
mohan gopal 2012년 2월 16일
i got x=[1 0 1 1] and i need to save the position of all the variables in a array p=[1 2 3 4]; which refers x(1)=1x(2)=2.... and r=[30 24 25 30] value generated . from this r it is evident that r(1) and r(4) have the same values. i need to chk the matrix=[ 0 0 0 0 ; 0 0 1 0; 0 1 0 0; 0 0 0 0 ]; from this matrix generated i need to chk the row(1) &column(1) if that values are all 0 then i will from winner subset saving the w=[1]; simularly for the remaining cases
  댓글 수: 1
Jan
Jan 2012년 2월 16일
You forgot to ask a question.
It is not clear how x, p, r and the matrix are connected. And what is w? I suggest to explain the problem with more details and a small example. You can post the code, you have created so far and explain the occurring problems.

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Logical에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by