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!