Borrar filtros
Borrar filtros

how to find the position in an array

2 visualizaciones (últimos 30 días)
mohan gopal
mohan gopal el 16 de Feb. de 2012
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 comentario
Jan
Jan el 16 de Feb. de 2012
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.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Logical en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by