Matrix manipulation by function
显示 更早的评论
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
采纳的回答
更多回答(1 个)
Fangjun Jiang
2017-4-6
C=A;
C(B,:)=[];
C(:,B)=[]
3 个评论
Andrei Bobrov
2017-4-6
Hi Fangjun!
Jan
2017-4-7
Yes, hi Fangjun!
Fangjun Jiang
2017-4-7
Hello, friends!
类别
在 帮助中心 和 File Exchange 中查找有关 Operators and Elementary Operations 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!