Add row and column to a interdependent matrix
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Santhosh Chandrasekar
el 19 de Feb. de 2018
Comentada: Santhosh Chandrasekar
el 19 de Feb. de 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 comentarios
Respuesta aceptada
KSSV
el 19 de Feb. de 2018
A = rand(10) ;
AA = zeros(size(A)+1) ;
AA(2:end,2:end) = A ;
AA(2:end,1) = 1 ;
1 comentario
Más respuestas (0)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!