alternative to interpolation, how to introduce randomness
조회 수: 1 (최근 30일)
이전 댓글 표시
Hello, I have a vector of 8760 values, representing hourly solar irradiance per one year. I need the irradiance "per second" (so moving to 31536000 values). I can do it by interpolation but is a quite rough method, too approximated. I want to introduce some randomness. Ideas?
댓글 수: 3
Jonas
2021년 4월 21일
what about using interp() and then just adding some randomness by addition or subtraction?
채택된 답변
Walter Roberson
2021년 4월 21일
d = rand(3600, length(flux_per_hour));
rd = d./sum(d,1);
flux_per_second = flux_per_hour(:).' .* rd; %seconds down, hours across
flux_per_second = flux_per_second(:); %consecutive seconds
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Sources에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!