Help with doing this simple problem please.
정보
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
이전 댓글 표시
Create a vector containing 100 random numbers between 0.5 and 0.75. Display on the screen how many times in the vector the following number is greater than the preceding one.
댓글 수: 0
답변 (2개)
madhan ravi
2018년 10월 23일
0 개 추천
Use rand() and a loop to satisfy the condition , this would solve your homework problem
댓글 수: 0
Image Analyst
2018년 10월 23일
Here's some hints to get you started: rand(), diff(), and sum(), fprintf().
r = rand(......
count = sum(diff(.......
fprintf('The number is %d.\n', count);
댓글 수: 0
이 질문은 마감되었습니다.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!