Matlab assignment
Watch this threadPage 1 of 1
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
How do i generalise my matlab coding for a sliding average filter applied to my ecg data values to take an input of any filter length.
this is my current code which displays an error:
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
Any help would be appreciated,
Thankyou!
this is my current code which displays an error:
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
Any help would be appreciated,
Thankyou!
0
reply
X
Page 1 of 1
Quick Reply
Back
to top
to top