could anyoen help me to understand ,what the command b will select from the matrix a ?
a=[1 3 2 ; 2 1 1 ; 3 2 3]
b= [a(1,2:3);a(2,1:2)]

 채택된 답변

M
M 2019년 12월 9일

1 개 추천

When executing the command it outputs :
b =
3 2
2 1
The command :
b= [a(1,2:3);a(2,1:2)]
selects the first line and column 2 to 3, then second line and column 1 to 2.
See here for more details.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Logical에 대해 자세히 알아보기

제품

릴리스

R2017b

태그

질문:

2019년 12월 9일

답변:

M
M
2019년 12월 9일

Community Treasure Hunt

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

Start Hunting!

Translated by