: Create a function that takes inputs “x” and “z” and generates any random matrix of dimension “x” or “z”, whichever is larger

2 visualizaciones (últimos 30 días)
Hi, I am stuck at this problem. I don't know alot about generating matrices. Help would be greatly appreicated.
  3 comentarios
Image Analyst
Image Analyst el 31 de En. de 2020
Also look up what max() returns, like max([x, z]) assuming x and z are scalars (single numbers, not arrays).
Gurinder Punni
Gurinder Punni el 31 de En. de 2020
I don't have any constraints so I can probably make then up.
So I should do something like this
f(x,z) = x*z
x = randi(0,100)
z= randi(0,100)
if x > z
matrix = [ x ]
else if z>x
matrix = [z]
end
idk, just some thoughts.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Random Number Generation en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2006a

Community Treasure Hunt

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

Start Hunting!

Translated by