Effacer les filtres
Effacer les filtres

how can alter this code to select some matrix ?

3 vues (au cours des 30 derniers jours)
Firas Al-Kharabsheh
Firas Al-Kharabsheh le 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 ]

Réponse acceptée

Azzi Abdelmalek
Azzi Abdelmalek le 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}

Plus de réponses (0)

Catégories

En savoir plus sur Creating and Concatenating Matrices dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by