I want to find the average of n data points in an array and cycle through to create a new array.
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Inteeskimo
el 8 de Nov. de 2017
Editada: Inteeskimo
el 15 de Nov. de 2017
I'm a complete beginner so sorry I can't even attempt this myself, go easy on me, please. Thank you :)
0 comentarios
Respuesta aceptada
Bjorn Gustavsson
el 8 de Nov. de 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 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Matched Filter and Ambiguity Function en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!