フィルターのクリア

I want to find the average of n data points in an array and cycle through to create a new array.

1 回表示 (過去 30 日間)
I'm a complete beginner so sorry I can't even attempt this myself, go easy on me, please. Thank you :)

採用された回答

Bjorn Gustavsson
Bjorn Gustavsson 2017 年 11 月 8 日
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 件)

カテゴリ

Help Center および File ExchangeMatched Filter and Ambiguity Function についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by