My code is as follows :
mat = [1 2 3 ; 4,5,6 ; 7 8 9];
mat([2 3], [2 3])
Question: Why is the output
5 6
8 9
and how is that determined?

 採用された回答

James Tursa
James Tursa 2017 年 10 月 6 日
編集済み: James Tursa 2017 年 10 月 6 日

1 投票

It is the 2nd & 3rd rows and the 2nd & 3rd columns of the matrix mat. The syntax is simply extracting a sub-matrix of the original.

1 件のコメント

Kent Le
Kent Le 2017 年 10 月 6 日
Thanks so much!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeGet Started with MATLAB についてさらに検索

タグ

質問済み:

2017 年 10 月 6 日

編集済み:

2017 年 10 月 6 日

Community Treasure Hunt

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

Start Hunting!

Translated by