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 个评论

the boundaries are excluded?
whay do you mean by that??
why do you think it’s wrong?
don' think there is boundaries, the numbers just need to be between 1 to 1000 and it has to be in 6,8 matrix.
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

0 个投票

Your way seems about right.

更多回答(0 个)

类别

帮助中心File Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息

产品

版本

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by