alternative to interpolation, how to introduce randomness
2 次查看(过去 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 中查找有关 Time Series 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!