how to create a vector of 5 random integers each in rang of -10 and 10.
2 次查看(过去 30 天)
显示 更早的评论
how to create a vector of 5 random integers each in rang of -10 and 10. Perform each of the following using only vectorized code:
Subtract 3 from each element,
Count how many are positive,
Get the absolute value of each element,
Find the maximum.
0 个评论
回答(2 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Random Number Generation 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!