Effacer les filtres
Effacer les filtres

I want to give a condition on the random function.

1 vue (au cours des 30 derniers jours)
Ji-hwan Hwang
Ji-hwan Hwang le 15 Juin 2015
Modifié(e) : the cyclist le 15 Juin 2015
I want to output only the values between 1 and 0.5, using the random function. A=rand>0.5 --> A between 1 and 0.5 example A =0.6, 0.7, 0.755, 0.954 others.. Hint plz....

Réponses (1)

the cyclist
the cyclist le 15 Juin 2015
Modifié(e) : the cyclist le 15 Juin 2015
A = 0.5 + 0.5*rand(N,1)
where N is the number of values you want.

Catégories

En savoir plus sur Mathematics dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by