alternative to interpolation, how to introduce randomness

1 回表示 (過去 30 日間)
Nicolò Monaco
Nicolò Monaco 2021 年 4 月 21 日
コメント済み: Nicolò Monaco 2021 年 4 月 22 日
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 件のコメント
Nicolò Monaco
Nicolò Monaco 2021 年 4 月 21 日
Sorry, I made a mistake. I meant 31536000 values which are secods in a year.
Jonas
Jonas 2021 年 4 月 21 日
what about using interp() and then just adding some randomness by addition or subtraction?

サインインしてコメントする。

採用された回答

Walter Roberson
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 ExchangeSources についてさらに検索

製品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by