how does matlab read matrix

3 次查看(过去 30 天)
Tomas
Tomas 2012-11-18
Hi, simple quick question: how does Matlab read matrix? From left to right or from top to bottom?
  4 个评论
Walter Roberson
Walter Roberson 2012-11-18
Functions do not take variables from matrices, with the exception of varargin.
Jan
Jan 2012-11-18
The question is still not clear. Perhaps it helps, if you explain what you are trying to achieve.

请先登录,再进行评论。

回答(2 个)

Jan
Jan 2012-11-18
编辑:Jan 2012-11-18
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 2012-11-18
编辑:Azzi Abdelmalek 2012-11-18
A=[1 2 3;4 5 6;7 8 9]
the result is
1 2 3
4 5 6
7 8 9

类别

Help CenterFile Exchange 中查找有关 Logical 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by