Split vector to sub vectors of equal size
古いコメントを表示
I have a lond vector of measurements taken every 15 mins for 3 months and want to seperate this in measurements of each day
What should I use?
回答 (1 件)
If the sampling times are uniform (constant sampling intervals between the observations) use the Signal Processing Toolbox buffer function.
v = randn(1,4*24*2) % Two Days' Measurements
rowLengths = 24*60/15;
vdays = buffer(v, rowLengths)
The reshape function is also an option, however buffer is easier to use.
I have a simple emulation of the buffer function (does not do everything) I can post if theSignal Processing Toolbox is not available.
.
カテゴリ
ヘルプ センター および File Exchange で Numeric Types についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!