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

1 次查看(过去 30 天)
Hi, I am stuck at this problem. I don't know alot about generating matrices. Help would be greatly appreicated.
  3 个评论
Gurinder Punni
Gurinder Punni 2020-1-31
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.

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Random Number Generation 的更多信息

产品


版本

R2006a

Community Treasure Hunt

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

Start Hunting!

Translated by