Adding more data points using interpolation

I have an array of 1x1382209 elements for Electric Field and an array of 1x172776 elements for Solar Zenith Angle (SZA). SZA follows a sinusoidal behavior and I want to give it more elements to "upsample" it to have as many data points as the Electric field array. I'm using upsample loosly here. I just need reasonable new data points maybe by interpolation of elements in SZA and adding the new data from interpolation exactly between the data points that's been intrapolated.
Thanks

 採用された回答

Matt J
Matt J 2022 年 1 月 3 日

1 投票

interp1(SZA, linspace(1 , numel(SZA), numel(ElectricField)) )

3 件のコメント

Pouya
Pouya 2022 年 1 月 3 日
Thank you very much Matt. Worked like a charm!
Matt J
Matt J 2022 年 1 月 3 日
Glad it worked, but please Accept-click the answer to indicate so.
Pouya
Pouya 2022 年 1 月 3 日
Done!

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

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeMATLAB についてさらに検索

質問済み:

2022 年 1 月 3 日

コメント済み:

2022 年 1 月 3 日

Community Treasure Hunt

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

Start Hunting!

Translated by