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
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
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
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 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!