alternative to interpolation, how to introduce randomness
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Nicolò Monaco
am 21 Apr. 2021
Kommentiert: Nicolò Monaco
am 22 Apr. 2021
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 Kommentare
Jonas
am 21 Apr. 2021
what about using interp() and then just adding some randomness by addition or subtraction?
Akzeptierte Antwort
Walter Roberson
am 21 Apr. 2021
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
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Sources finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!