how to find the position in an array

1 回表示 (過去 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 Center および File ExchangeStartup and Shutdown についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by