how does matlab read matrix
이전 댓글 표시
Hi, simple quick question: how does Matlab read matrix? From left to right or from top to bottom?
댓글 수: 4
Jan
2012년 11월 18일
What exactly does "read" mean?
Tomas
2012년 11월 18일
Walter Roberson
2012년 11월 18일
Functions do not take variables from matrices, with the exception of varargin.
Jan
2012년 11월 18일
The question is still not clear. Perhaps it helps, if you explain what you are trying to achieve.
답변 (2개)
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
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
카테고리
도움말 센터 및 File Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!