Say I have a matrix A=[1 2 3; 4 5 6; 7 8 9] and i want to define matrix B as Matrix A without the middle row, but I must be able to define Matrix C as Matrix A with out the bottom row? how would I do this?
46 views (last 30 days)
Show older comments
Say I have a matrix A=[1 2 3; 4 5 6; 7 8 9] and i want to define matrix B as Matrix A without the middle row, but I must be able to define Matrix C as Matrix A with out the bottom row? how would I do this?
0 Comments
Accepted Answer
Azzi Abdelmalek
on 6 Feb 2015
B=A([1 3],:)
C=A([1 2],:)
More Answers (1)
Rabab
on 28 Mar 2024
For a matrix M=[1 2 3;4 5 6 ;7 8 9] the result of M (end,:) should be In matlab
0 Comments
See Also
Categories
Find more on Matrix Indexing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!