Grouping consectuve datapoints from a table into an array
Ältere Kommentare anzeigen
Hello,
I have atatched a picture of my 54x2 table. I was looking for help with my variable InstantPowerX. Basically, I would like a code that would organize consective numbers into an array called pulses. (For example, the first three point 20327,20328,20329 are consectuive, and they will be called pulse 1, 22516,22517,22518 are the next consectuive dataset and they will be stored in array called pulse 2 and so on) There should be a total of 18 pulses *18x3=54 since all data is 3 seconds in length before jumping to the next three seconds).
Akzeptierte Antwort
Weitere Antworten (1)
David Hill
am 3 Nov. 2022
Best to keep all the data together. Just reshape the array and index into it.
pulse=reshape(yourTable.InstantPowerX,3,[])';%pulse1 would equal pulse(1,:), pulse2 would equal pulse(2,:)
1 Kommentar
Youssif Youssif
am 3 Nov. 2022
Kategorien
Mehr zu Tables finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!