How to generate random data which follows a specific pattern ?
이전 댓글 표시
I want to generate yearly Outdoor temperature data with 1 hr interval and having seasonal variation ( Summer, Winter ). There will be 8760 timesteps of data.In summer Temperature will vary around the range of 25-35 degree and In winter it will vary around -10 to 10 degree. I am a beginner in Matlab. Any suggestion or code reference would be very helpful
채택된 답변
추가 답변 (1개)
KSSV
2017년 2월 6일
There is a inbuilt command rand in matlab which generates Uniformly distributed random numbers between 0 and 1. doc rand. To generate random numbers in a given range [a,b]. You may follow:
a = 50;
b = 100;
r = (b-a).*rand(1000,1) + a;
댓글 수: 2
S M Shahnewaz Siddiquee
2017년 2월 6일
편집: S M Shahnewaz Siddiquee
2017년 2월 6일
KSSV
2017년 2월 6일
Numbers follow uniform distribution. what pattern you are expecting?
카테고리
도움말 센터 및 File Exchange에서 Random Number Generation에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!