how to find the position in an array
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
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
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.
Respuestas (0)
Ver también
Categorías
Más información sobre Startup and Shutdown en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!