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

1 次查看(过去 30 天)
probably I need to use some loop someone's help?
  2 个评论
James Tursa
James Tursa 2017-7-27
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 2017-7-28
@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.

请先登录,再进行评论。

采纳的回答

Star Strider
Star Strider 2017-7-28
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);

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息

标签

尚未输入任何标签。

Community Treasure Hunt

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

Start Hunting!

Translated by