Effacer les filtres
Effacer les filtres

Understand a question. HELP!

3 vues (au cours des 30 derniers jours)
AnnaMaria Accardo
AnnaMaria Accardo le 26 Fév 2015
Commenté : Joseph Cheng le 26 Fév 2015
Hi guys, can you help me understanding what does the question ask for? Suppose C is the matrix:
1 2 3
4 5 6
7 8 9
10 11 12
Create a matrix C2 that is the upper left 2 × 2 submatrix of C.

Réponse acceptée

Joseph Cheng
Joseph Cheng le 26 Fév 2015
Modifié(e) : Joseph Cheng le 26 Fév 2015
what submatrix means is a subset formed by taking a block of size mxn (in your example 2x2) from the original matrix. so the 2x2 submatrix of C that is the upper left means it would be the upper left corner 2x2 [1 2;4 5].
So the question is probably asking you to define a new submatrix C2 by the means of array indexing (is that the right word?) instead of hard coding it in. you can read up on it here http://www.mathworks.com/help/matlab/math/matrix-indexing.html. So eventually it would look like:
C2=C(_somethinghere_).
  4 commentaires
AnnaMaria Accardo
AnnaMaria Accardo le 26 Fév 2015
aaaaah perfect. Thanks Joseph. Easy points for you ;)
Joseph Cheng
Joseph Cheng le 26 Fév 2015
Anytime, trying to get back into this after a few month hideous.

Connectez-vous pour commenter.

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