How to get a square matrix out of a augmented matrix?

3 Ansichten (letzte 30 Tage)
Shankhadeep Saha
Shankhadeep Saha am 18 Okt. 2021
Kommentiert: KSSV am 18 Okt. 2021
Say there is a input square matrix: A
And we create a identity matrix of the same order as A and name it B
Then we create a augmented matrix Ag = [A, B]
now I perform some operation on the Ag matrix and now I want to print the changed B matrix within the Ag matrix. How can I do that?

Antworten (1)

KSSV
KSSV am 18 Okt. 2021
n = 5 ;
A = rand(n) ; % square matrix
B = eye(size(A)) ; % Identity matrix
Ag = [A B] ; % augemented matrix
  4 Kommentare
Shankhadeep Saha
Shankhadeep Saha am 18 Okt. 2021
It worked! Thanks a lot!! :)
KSSV
KSSV am 18 Okt. 2021
Thanks is acepting/ voting the answer. :)

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Sparse Matrices finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by