How do I create a Matlab 10x10 matrix of numbers 1-100?

조회 수: 2 (최근 30일)
Matlab12
Matlab12 2014년 2월 23일
댓글: Sabrina 2017년 6월 23일
How do I create a Matlab 10x10 matrix that contains the numbers 1-100 in column major form? I am not allowed to use the colon operator more than four times.

채택된 답변

Raza Ali
Raza Ali 2014년 2월 23일
A=reshape(1:100,10,10)
or
A=reshape(1:100,10,10)'
  댓글 수: 2
Matlab12
Matlab12 2014년 2월 23일
Much thanks Raza!
Sabrina
Sabrina 2017년 6월 23일
Thanks! It helped me too.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Logical에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by