Converting wind/wave data to hourly data by interpolation
古いコメントを表示
Dear All,
I have wind and wave data that as can be seen attached. I want to convert it to hourly data acording to duration (time) values in column A. The value of duration here represents the duration of the wind blowing and its unit is hour. I want to interpolate all the other parameters while converting to hourly data. For example, I have formulated this in Excel for the line as follows,
D2-(($D$2-$D$3)/$A$2)
D3-(($D$2-$D$3)/$A$2)
D4-(($D$2-$D$3)/$A$2)
......
D8-(($D$2-$D$3)/$A$2)
The problem is, this is a very large set of data and doing this manually in Excel will take an enourmous amount of time. Is there a command in MATLAB where I can add (A-1) number of columns to each line and interpolate the rest of columns as described above?
Thank you in advance!
5 件のコメント
Adam Danz
2022 年 6 月 30 日
Are the durations consecutive? In other words, the first 3 durations are 8,1,2, does that account for a consecutive 11 hour period?
Seda Cora Özdemir
2022 年 6 月 30 日
Adam Danz
2022 年 6 月 30 日
I've updated my answer with the following changes.
- I replaced your demo file with a clean version that removes the added highlighted rows.
- Critically, the timestamps are computed so that they start with 0.
I've spot-checked a few rows of the results and they seem to match your expected results from the original data file.
Seda Cora Özdemir
2022 年 6 月 30 日
Adam Danz
2022 年 6 月 30 日
Look at the last row of data; it may not be included in the final interpolated timetable. I don't know how you would interpolate that last row but it's just something to keep in mind.
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Tables についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
