Grouping consectuve datapoints from a table into an array
Mostrar comentarios más antiguos
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).
Respuesta aceptada
Más respuestas (1)
David Hill
el 3 de Nov. de 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 comentario
Youssif Youssif
el 3 de Nov. de 2022
Categorías
Más información sobre Tables en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!