Azzera filtri
Azzera filtri

how can alter this code to select some matrix ?

3 visualizzazioni (ultimi 30 giorni)
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 ]

Risposta accettata

Azzi Abdelmalek
Azzi Abdelmalek il 2 Mag 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}

Più risposte (0)

Categorie

Scopri di più su Creating and Concatenating Matrices in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by