Add row and column to a interdependent matrix
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Santhosh Chandrasekar
am 19 Feb. 2018
Kommentiert: Santhosh Chandrasekar
am 19 Feb. 2018
Hi, how to change the below mentioned 'A' matrix to 'AA' matrix by adding a row and column of 'CR' with the exact values for 'CR' as mention below. For 'CR' all the values in the row from CR to E221 will have 0 and in the column, CR will be zero and E1 to E221 will be 1. I want that string 'CR' also need to be added to the existing headings of E1 to E221 in the row and column wise.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/170541/image.jpeg)
0 Kommentare
Akzeptierte Antwort
KSSV
am 19 Feb. 2018
A = rand(10) ;
AA = zeros(size(A)+1) ;
AA(2:end,2:end) = A ;
AA(2:end,1) = 1 ;
1 Kommentar
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Random Number Generation 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!