Create a interdependent matrix in Matlab and repeat it for 10 times
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Santhosh Chandrasekar
il 16 Feb 2018
Commentato: Santhosh Chandrasekar
il 16 Feb 2018
Hi, I want to create the below mentioned interdependent matrix Matlab as mentioned below from E101 to S1(blue color) and repeat that for 10 times as done below (green color) E102 to S2 with continuous numbering for each new group(green color) from their previous group(blue color). Can you please help me with this.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/170444/image.jpeg)
0 Commenti
Risposta accettata
Andrei Bobrov
il 16 Feb 2018
nm = cellstr(reshape((string({'E','R','E','S'}) + ([101,1,106,1] + (0:9)'))',[],1));
T = repmat({tril(ones(4),-1)},1,10);
out = [{nan},nm';nm,num2cell(blkdiag(T{:}))];
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!