how to use randomMatrix properly
2 views (last 30 days)
Show older comments
I am trying to us the randomMatrix function using the example in the documentation.
when i write :
linalg::randomMatrix(2, 2, Dom::Integer)
I get: Error: Unexpected MATLAB operator.
0 Comments
Accepted Answer
Sean de Wolski
on 14 Nov 2013
This is a MuPad command. To run it, open a MuPad note book and run it there:
mupad %or click the app.
And for more info:
doc mupad
If you just want a random integer matrix in MATLAB look at randi
randi(10,2,2)
And for more info:
doc randi
2 Comments
Sean de Wolski
on 14 Nov 2013
You could use randperm in a loop or:
m = 5;
n = 9;
[~,R] = sort(rand(m,n),2)
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!