How to find the value of a matrix in a specific position?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
abbxucy11
el 13 de Sept. de 2016
I have a matrix A with the positions (361x2) stored and i want to find the values of another matrix B in the specific positions ..how can i do it?
2 comentarios
Respuesta aceptada
Adam
el 13 de Sept. de 2016
sz = size( B );
idx = sub2ind( sz, A(:,1), A(:,2) );
res = B( idx );
0 comentarios
Ver también
Categorías
Más información sobre Cell Arrays en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!