extracting data from matrix
Mostrar comentarios más antiguos
Hello every bod
let assume matrix
A =
[10 20 1
30 40 2
50 60 3
70 80 4
90 100 5]
B =
[30 40
70 80]
we need to identify the third column of the matrix B, hence
B =
[30 40 2
70 80 4]
Respuestas (1)
Azzi Abdelmalek
el 16 de Jul. de 2016
Editada: Azzi Abdelmalek
el 16 de Jul. de 2016
A= [10 20 1
30 40 2
50 60 3
70 80 4
90 100 5]
B=[30 40
70 80]
idx=ismember(A(:,1:2),B,'rows')
B(:,3)=A(idx,3)
2 comentarios
Abdelwahab Fawzy
el 16 de Jul. de 2016
Azzi Abdelmalek
el 16 de Jul. de 2016
Editada: Azzi Abdelmalek
el 16 de Jul. de 2016
Can you explain? post an example to make your question clear
Categorías
Más información sobre Resizing and Reshaping Matrices en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!