Effacer les filtres
Effacer les filtres

hi i need writing a code that ceil random number without preset func like ceil,fix,

1 vue (au cours des 30 derniers jours)
probably I need to use some loop someone's help?
  2 commentaires
James Tursa
James Tursa le 27 Juil 2017
Why can't you use supplied functions? (You are going to need to use some supplied functions to get this done). Is this homework? What have you done so far?
Jan
Jan le 28 Juil 2017
@yuval ohayon: The question is not clear. Which functions are not allowed? What exactly are "random numbers"? Please edit the question and add some details.

Connectez-vous pour commenter.

Réponse acceptée

Star Strider
Star Strider le 28 Juil 2017
If you are allowed to use the rem or mod functions, this works:
v = 100*rand(1,10);
Out = v - rem(v,1);
Out = v - mod(v,1);

Plus de réponses (0)

Catégories

En savoir plus sur Creating and Concatenating Matrices dans Help Center et File Exchange

Tags

Aucun tag saisi pour le moment.

Community Treasure Hunt

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

Start Hunting!

Translated by