select from matrix!

6 vues (au cours des 30 derniers jours)
kahdlia alshikh
kahdlia alshikh le 9 Déc 2019
Réponse apportée : M le 9 Déc 2019
could anyoen help me to understand ,what the command b will select from the matrix a ?
a=[1 3 2 ; 2 1 1 ; 3 2 3]
b= [a(1,2:3);a(2,1:2)]

Réponse acceptée

M
M le 9 Déc 2019
When executing the command it outputs :
b =
3 2
2 1
The command :
b= [a(1,2:3);a(2,1:2)]
selects the first line and column 2 to 3, then second line and column 1 to 2.
See here for more details.

Plus de réponses (0)

Catégories

En savoir plus sur Multidimensional Arrays dans Help Center et File Exchange

Tags

Produits


Version

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by