use rand in editor
6 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I was given a script to edit with the function "randi" in it, i have a older version of matlab R14. It worked on the latest version, curious if there is n easy conversion to fix this issue.
3 commentaires
Réponses (1)
Image Analyst
le 7 Avr 2012
You can define your own randi like this:
function out = randi(iMax, rows, columns)
out = int32(floor(iMax*rand(rows, columns) + 1));
Of course that is not as flexible in the types of input arguments that the real randi() accepts, but you can work on that if you want.
0 commentaires
Voir également
Catégories
En savoir plus sur Logical dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!