Delete first row matrix and records new value
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hey! I'm going to record data continuously, and acquire 1000samples/sec for 8 different channels (from a DAQ board). After 30 seconds I'll have a 30000x8 matriz and I'll need to average each column except for the first one. After averaging it I'll need to save that value, delete the first second of this acquired data (which means the first 1000 lines from the matrix) and move the whole matrix 1000 lines up, so I can record the next second worth of data (the next 1000 lines), and repeat this while I'm recording live data, for an undefined period of time.
Anyone know how I can do this? Mainly, delete the first 1000 rows, move the matrix up to start at line 1 again and record new data in the last 1000 lines that just became empty by moving the matrix up.
I'm very new to matlab and would really appreciate any kind of help.
0 Kommentare
Antworten (2)
Sulaymon Eshkabilov
am 7 Jul. 2021
Have you read this documentation for DAQ tools and fcns of MATLAB:
Why not to collect all data for whole 30 sec or whatever time length, and then perform averaging or any necessary data processing. If this data processing has to be continuous for control purposes, then it is necessary.
1 Kommentar
Soniya Jain
am 7 Jul. 2021
- To find mean of matrix, you can refer Matlab documentation: https://in.mathworks.com/help/matlab/ref/mean.html
- What do you mean by moving the matrix up? If you want to delete the 1st 1000 rows, you can overwrite it. And you can use loop to record new data every time
- To learn more about Matlab, you can refer Matlab Onramp Course.
Siehe auch
Kategorien
Mehr zu Data Acquisition Toolbox Supported Hardware finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!