Spline issues with due to data with inconsistent step sizes

3 ビュー (過去 30 日間)
James Mallett
James Mallett 2017 年 9 月 8 日
コメント済み: Stephen23 2017 年 9 月 8 日
I have a very large matrix, it consists of the solar energy available at each wavelength from 200nm to 4000nm. The problem is that it steps through these at irregular interavals, it starts off with 0.5nm increments, then proceeds to 1nm increments and at higher wavelengths the step size is 5nm.
How would I be able to estimate/sample the data so that I only have the values with increments of 1nm between the wavelengths (x value).
I have tried using spline and interpolate, but have had no success. Example below where solx is the current x values and soly is the corresponding y values. And x is the range of desired wavelengths with steps of 1nm
newysol=spline(solx,soly,x);
  2 件のコメント
John D'Errico
John D'Errico 2017 年 9 月 8 日
A spline has no requirement that the step sizes be uniform.
Please post your data, so we can see what you are doing.
Stephen23
Stephen23 2017 年 9 月 8 日
"I have tried using spline and interpolate, but have had no success"
And if you do not show us what you are doing, how do you expect us to help you?

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

回答 (0 件)

カテゴリ

Help Center および File ExchangeSplines についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by