필터 지우기
필터 지우기

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 CenterFile Exchange에서 Matched 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