Create a new matrix
显示 更早的评论
Let A a matrix and B a vector defined by :
A=[ 4 2
7 4
3 5
6 8
8 1];
B= [4 6 7 8];
I wish to know how to create a new matrix C which is a part of matrix A but necessary contain an element of the vector B, given by
C = [ 7 4
6 8];
If anyone could help , I'd greaty appreciate it.
2 个评论
Sam Chak
2022-4-18
Sounds like an IQ puzzle.
What is the governing rule for the contruction of Matrix
?
A brief glance at Matrix
shows that:
C = [A(2,:); A(4,:)]
Walter Roberson
2022-4-18
C = A([2 4],:)
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Array and Matrix Mathematics 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!