I wish to detect heart rates using the Discrete Cosine transform

4 views (last 30 days)
Getting below error. Why doesn't this method work? Help me for solving this error
Array indices must be positive integers or logical values.
Error in Body_Motion (line 110)
Xdct(k+1) = Xdct(k+1)+ 2*err-frame_length(n1) .* cos(2*pi*k*n1/M);
----------------------------------------------------------
frame_length = 500;
period = 50;
M=2^13;
Xdct =zeros(1,M);
err-frame_length == 1:fix((SAMPLE-frame_length) / period)+1;
for k = 0:1:M-1
for n1 = 0:SAMPLE-1
Xdct(k+1) = Xdct(k+1)+ 2*err-frame_length(n1) .* cos(2*pi*k*n1/M);
end
end

Answers (0)

Categories

Find more on ECG / EKG in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!