Filter löschen
Filter löschen

how can alter this code to select some matrix ?

3 Ansichten (letzte 30 Tage)
Firas Al-Kharabsheh
Firas Al-Kharabsheh am 2 Mai 2016
if i have this code
for iii=1:4
X = randi([0 1],3,3);
end
how can i select the X number 2 and number 4 like this
X = [ 1 1 0
0 1 0
0 0 1 ]
X = [ 0 1 0
1 1 1
1 0 0]
X = [1 1 1
0 1 0
1 1 0]
X = [1 0 1
1 1 0
1 0 0 ]
i want the result be
X = [ 0 1 0
1 1 1
1 0 0]
X = [1 0 1
1 1 0
1 0 0 ]

Akzeptierte Antwort

Azzi Abdelmalek
Azzi Abdelmalek am 2 Mai 2016
X={[ 1 1 0;0 1 0;0 0 1 ], [ 0 1 0;1 1 1;1 0 0]...
[1 1 1;0 1 0;1 1 0],[1 0 1;1 1 0;1 0 0]}
X{2}
X{4}

Weitere Antworten (0)

Kategorien

Mehr zu Creating and Concatenating 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