Info
此问题已关闭。 请重新打开它进行编辑或回答。
How do I create a file of one column 1-24 second column random integers from 0-100 and third column random from 0-1?
1 次查看(过去 30 天)
显示 更早的评论
Problem 5.22 in the textbook. I can't get the code right to create a file of 24 lines with the random numbers in these ranges.
3 个评论
回答(1 个)
Image Analyst
2016-2-16
Make up column 1 with the colon operator, and columns 2 and 3 with randi(). Write the whole thing out with csvwrite().
1 个评论
Image Analyst
2016-2-17
rand() is different than randi(). The first arguments are not the same. Try this:
visibility = rand(1,24);
此问题已关闭。
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!