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
Jan 2012년 11월 18일
What exactly does "read" mean?
Tomas
Tomas 2012년 11월 18일
read means the way function takes variables from matrix.
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일

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
Azzi Abdelmalek 2012년 11월 18일
편집: Azzi Abdelmalek 2012년 11월 18일

0 개 추천

A=[1 2 3;4 5 6;7 8 9]
the result is
1 2 3
4 5 6
7 8 9

댓글 수: 2

Jan
Jan 2012년 11월 18일
Does this answer the question?
Azzi Abdelmalek
Azzi Abdelmalek 2012년 11월 18일
Maybe

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

태그

질문:

2012년 11월 18일

Community Treasure Hunt

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

Start Hunting!

Translated by