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 comentarios

madhan ravi
madhan ravi el 25 de Feb. de 2019
the boundaries are excluded?
Oscar Tsang
Oscar Tsang el 25 de Feb. de 2019
whay do you mean by that??
madhan ravi
madhan ravi el 25 de Feb. de 2019
why do you think it’s wrong?
Oscar Tsang
Oscar Tsang el 25 de Feb. de 2019
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 el 25 de Feb. de 2019
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

Iniciar sesión para comentar.

 Respuesta aceptada

madhan ravi
madhan ravi el 25 de Feb. de 2019

0 votos

Your way seems about right.

Más respuestas (0)

Categorías

Más información sobre Creating and Concatenating Matrices en Centro de ayuda y File Exchange.

Productos

Versión

R2018b

Etiquetas

Preguntada:

el 25 de Feb. de 2019

Comentada:

el 25 de Feb. de 2019

Community Treasure Hunt

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

Start Hunting!

Translated by