Effacer les filtres
Effacer les filtres

how does matlab read matrix

3 vues (au cours des 30 derniers jours)
Tomas
Tomas le 18 Nov 2012
Hi, simple quick question: how does Matlab read matrix? From left to right or from top to bottom?
  4 commentaires
Walter Roberson
Walter Roberson le 18 Nov 2012
Functions do not take variables from matrices, with the exception of varargin.
Jan
Jan le 18 Nov 2012
The question is still not clear. Perhaps it helps, if you explain what you are trying to achieve.

Connectez-vous pour commenter.

Réponses (2)

Jan
Jan le 18 Nov 2012
Modifié(e) : Jan le 18 Nov 2012
The values are store in column order in the memory:
A = [1 2 3; 4 5 6; 7 8 9];
A(:)
>> [1; 4; 7; 2; 5; 8; 3; 6; 9]
This means: The 1st element is 1 stored in the data of the matrix A is 1, the 2nd is 4.

Azzi Abdelmalek
Azzi Abdelmalek le 18 Nov 2012
Modifié(e) : Azzi Abdelmalek le 18 Nov 2012
A=[1 2 3;4 5 6;7 8 9]
the result is
1 2 3
4 5 6
7 8 9
  2 commentaires
Jan
Jan le 18 Nov 2012
Does this answer the question?
Azzi Abdelmalek
Azzi Abdelmalek le 18 Nov 2012
Maybe

Connectez-vous pour commenter.

Catégories

En savoir plus sur Logical dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by