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 ExchangeCreating 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