Matrix manipulation by function
Mostrar comentarios más antiguos
Dear all, For a given matrix (square) i need to eliminate some elements (some rows and columns)
A =
35 6 19
3 7 23
31 2 27
I need only the second (not the first and the third) row and column : the eliminated are stocked in a vector
B = (1 3)
So : some function (A, B) :::> the result C = 7
function (A, B) = C
2 comentarios
KSSV
el 6 de Abr. de 2017
iwant = A(2,2)
wont it solve the purpose?
Lila wagou
el 6 de Abr. de 2017
Respuesta aceptada
Más respuestas (1)
Fangjun Jiang
el 6 de Abr. de 2017
C=A;
C(B,:)=[];
C(:,B)=[]
3 comentarios
Andrei Bobrov
el 6 de Abr. de 2017
Hi Fangjun!
Jan
el 7 de Abr. de 2017
Yes, hi Fangjun!
Fangjun Jiang
el 7 de Abr. de 2017
Hello, friends!
Categorías
Más información sobre Operators and Elementary Operations en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!