From 2c89977afd4ea129248ff3866f49741a822396b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nadica=20Miljkovi=C4=87?= <41929315+NadicaSm@users.noreply.github.com> Date: Thu, 20 Apr 2023 09:57:58 +0200 Subject: [PATCH] Update optimal segment selection.m --- optimal segment selection.m | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/optimal segment selection.m b/optimal segment selection.m index 9147c72..72dae69 100644 --- a/optimal segment selection.m +++ b/optimal segment selection.m @@ -92,20 +92,19 @@ val_SNR = zeros(2, 25); val_fQRS_to_mQRS = zeros(2, 25); -for i = 1:25 - [~,i1] = max(reshape(xSQI_parts(i, :, :), 4, 11)'); - [~,i2] = max(max(reshape(xSQI_parts(i, :, :), 4, 11)')); - val_xSQI(2, i) = i2; - val_xSQI(1, i) = i1(i2); - [~, i1] = max(reshape(snr_parts(i, :, :), 4, 11)'); - [~, i2] = max(max(reshape(snr_parts(i, :, :), 4, 11)')); - val_SNR(2, i) = i2; - val_SNR(1, i) = i1(i2); - [~, i1] = max(reshape(fQRS_to_mQRS(i, :, :), 4, 11)'); - [~, i2] = max(max(reshape(fQRS_to_mQRS(i, :, :), 4, 11)')); - val_fQRS_to_mQRS(2, i) = i2; - val_fQRS_to_mQRS(1, i) = i1(i2); - +for ix = 1:25 + [~,i1] = max(reshape(xSQI_parts(ix, :, :), 4, 11)'); + [~,i2] = max(max(reshape(xSQI_parts(ix, :, :), 4, 11)')); + val_xSQI(2, ix) = i2; + val_xSQI(1, ix) = i1(i2); + [~, i1] = max(reshape(snr_parts(ix, :, :), 4, 11)'); + [~, i2] = max(max(reshape(snr_parts(ix, :, :), 4, 11)')); + val_SNR(2, ix) = i2; + val_SNR(1, ix) = i1(i2); + [~, i1] = max(reshape(fQRS_to_mQRS(ix, :, :), 4, 11)'); + [~, i2] = max(max(reshape(fQRS_to_mQRS(ix, :, :), 4, 11)')); + val_fQRS_to_mQRS(2, ix) = i2; + val_fQRS_to_mQRS(1, ix) = i1(i2); end val_xSQI(1, :) = (val_xSQI(1, :) - 1)*5;