6,8 Matrix

조회 수: 7 (최근 30일)
Oscar Tsang
Oscar Tsang 2019년 2월 25일
댓글: Oscar Tsang 2019년 2월 25일
The problem I'm having is that for an assignment the question was " A matrix with 6 rows and 8 columns of integers between 1 and 1000. ". My answer to that is below but don't know if thats correct or not or if its just me having a moment.
a = randi([1 1000],6,8)
  댓글 수: 5
Oscar Tsang
Oscar Tsang 2019년 2월 25일
don' think there is boundaries, the numbers just need to be between 1 to 1000 and it has to be in 6,8 matrix.
Oscar Tsang
Oscar Tsang 2019년 2월 25일
The reason why I thought it was wrong because i thought the question meant have a 6x8 matrix and fill it with number from 1 to 1000 but not in random

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

채택된 답변

madhan ravi
madhan ravi 2019년 2월 25일
Your way seems about right.

추가 답변 (0개)

카테고리

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

제품


릴리스

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by