how to add value after every 5 second
이전 댓글 표시
hello friends i wish to add a number after every five second for the one minute
suppose i wish to get random number from -2 to 2 and store this no and after five second another random number will be get from -2 to 2 and add with the stored no and result of this no will be store again after five second new random no will be get from -2 to 2 and add with stored no(resulted no) this process will be run for a minute it means 12 time i get the random number and add this no if it is possible then how?
p=randi(-2,2);
thanks in advance
채택된 답변
추가 답변 (1개)
Walter Roberson
2015년 5월 6일
0 개 추천
Do you want 5 simulated seconds (that might take only a fraction of a second to simulate), or do you want to have MATLAB wait doing nothing for those five seconds?
카테고리
도움말 센터 및 File Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!