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.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Get 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