Clear Filters
Clear Filters

Info

This question is closed. Reopen it to edit or answer.

how i can solve it ??

2 views (last 30 days)
yasmeen hadadd
yasmeen hadadd on 22 Aug 2016
Closed: MATLAB Answer Bot on 20 Aug 2021
Hello; I have this code :
Heart_pulse_avg =zeros(1,Lp_mean);
for m=1:L-2
Heart_pulse_arrays{m} = imresize(Heart_pulse_arrays{m}, [1 Lp_mean], 'bicubic');
Heart_pulse_arrays_values= Heart_pulse_arrays{m};
for n=1:length(Heart_pulse_arrays)-9
Heart_pulse_avg=mean(Heart_pulse_arrays_values(n:n+9));
end
Heart_pulse_avg_final=Heart_pulse_avg_values;
end
and this error : ??? Index exceeds matrix dimensions.
how i can solve it ?
  3 Comments
yasmeen hadadd
yasmeen hadadd on 22 Aug 2016
Edited: per isakson on 22 Aug 2016
[pks,locs] = findpeaks(ECG,'minpeakheight',mph);
L=length(locs);
for m=1:L-2
beat_rate(m) = 1/((locs(m+1)-locs(m))*T)*60;
Heart_pulse = ECG(locs(m):locs(m+1));
Heart_pulse_arrays{m} = Heart_pulse;
Lp(m)=length(Heart_pulse);
end
Lp_mean = round(mean(Lp));
heart_rate = round(mean(beat_rate)*10)/10;

Answers (0)

This question is closed.

Community Treasure Hunt

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

Start Hunting!