georgia.ap_
Badges: 1
Rep:
? You'll earn badges for being active around the site. Rep gems come when your posts are rated by other community members.
#1
Report Thread starter 7 months ago
#1
how to generalise my code in matlab that applies a sliding average filter to ecg data values to take input of any filter length.
what i've currently done (but error is displayed when i try to run it):
function[slidingavg]=G_function(ecg_emg,fl)
if isinteger(fl)
if isnumeric(ecg_emg)
len=length(ecg_emg)
for l=1:len-fl
p=0
for m=0:5-1
p=(p+ecg_emg(l+m))
end
slidingavg(l)=p/l
end
else
print('yes')
end
else
print('databad')
end
0
reply
X

Quick Reply

Attached files
Write a reply...
Reply
new posts
Back
to top
Latest
My Feed

See more of what you like on
The Student Room

You can personalise what you see on TSR. Tell us a little about yourself to get started.

Personalise

Were exams easier or harder than you expected?

Easier (21)
27.27%
As I expected (23)
29.87%
Harder (29)
37.66%
Something else (tell us in the thread) (4)
5.19%

Watched Threads

View All