I want to find the average of n data points in an array and cycle through to create a new array.
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Inteeskimo
am 8 Nov. 2017
Bearbeitet: Inteeskimo
am 15 Nov. 2017
I'm a complete beginner so sorry I can't even attempt this myself, go easy on me, please. Thank you :)
0 Kommentare
Akzeptierte Antwort
Bjorn Gustavsson
am 8 Nov. 2017
Depending on your future likelihood of using different levels of matlab read up on howtos and introductions to use matlab.
That said...
Read/load as much data as you can into memory at once and then process the data as suitable. Splitting up reading in steps and chunks is just going to bog down the writing running and updating your code.
If your ecg-data can be loaded with matlab's load function use that. If you can use use some of matlab's functions for loading data from formatted text-files, like textread, then use those. If you need to read files in some more obscure format you might have to use fscanf or for data in binary formats fread or fgetl/|fgets|. In the best case you have some code read the ecg-files if they are in some dedicated file-format, then this step is set.
For the filtering you can use either the filter function or the conv function:
ecg_sliding5 = conv(ecg_data,ones(1,5)/5,'same');
HTH
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Matched Filter and Ambiguity Function 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!