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!