Inserting more rows between already existing rows of a structure
Show older comments
Hello,
I am trying to extract data of interest from a time data series in the form of episodes.
Y = accelerometer data
t = time data
pks & locs = location and amplitude of peaks of interest
I already have sections of data which could be data of interest into episodes in the structure:
n = amount of episodes
grp_pks(n).Y = Y(1,i_str:i_end);
grp_pks(n).t = t(1,i_str:i_end);
grp_pks(n).i = [i_str, i_end];
grp_pks(n).pks = pks;
grp_pks(n).locs = locs;
After analysing the peaks further, I want to devide the episodes when peaks are further apart then 2 sec and delete episodes with > 5 peaks.
Therefore, I would need to be able to insert extra n into the structure, e.g. having grp_pks(3) devided into grp_pks(3), grp_pks(4), grp_pks(5), ... without overwriting the grp_pks(4), grp_pks(5), ... . Is that possible? with Matrixes I would just do:
mtx_pks = [mtx_pks(1:2,:); pks; mtx_pks(4:end,:)];
but I am not sure how to tansfere that onto a structure.
Thank you
Accepted Answer
More Answers (0)
Categories
Find more on Descriptive Statistics in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!