How can i extract sub matrix from basic matrix
Show older comments
Hello. My basic matrix is
B=[-1,1,1,5+i*2;0,-1,0,20+i*10;0,0,-1,10+i*3;1,0,0,0;30+i*30,50+i*50,60+i*60,0]
Sub matrix is A
A=[-1,1,1;0,-1,0;0,0,-1;1,0,0]
Accepted Answer
More Answers (2)
Navadeep Ganesh U
on 1 Dec 2019
Edited: Navadeep Ganesh U
on 1 Dec 2019
5 votes
A=B([1,2,3],[1,2,3])
means, We need to extract B's 1st 2nd and 3rd row along with B's 1st 2nd and 3rd column.
By this you can get approprite answer.
It can also be written as A=B([1:3],[1:3])
LoL,...............6yrs later
5 Comments
Griffen Morrison
on 12 Feb 2020
Hey if your explination didnt help the original poster it some random person years later to understand the code. Thanks!
Wehann Landsberg
on 30 Jul 2020
Yeah, someone like me :)
aniss skalli
on 6 Dec 2020
and like me
Rafael Olaru
on 23 Feb 2021
or like me :D
Brandon Fenske
on 2 Sep 2022
THANK YOU
sunny
on 17 Feb 2024
B=[-1,1,1,5+1i*2;0,-1,0,20+1i*10;0,0,-1,10+1i*3;1,0,0,0;30+1i*30,50+1i*50,60+1i*60,0];
B(:,end)=[];
B(end,:)=[];
Categories
Find more on Creating and Concatenating Matrices 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!