Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Matrix dimensions must be consistent #11

Open
cpp1203 opened this issue Apr 18, 2020 · 2 comments
Open

Matrix dimensions must be consistent #11

cpp1203 opened this issue Apr 18, 2020 · 2 comments

Comments

@cpp1203
Copy link

cpp1203 commented Apr 18, 2020

Hello
An error occurred recently when I ran your program.The matrix dimensions are inconsistent. Can you answer it if you have time?
best wishes!

Questions are as follows:

mhrv('db/mitdb/111', 'window_minutes', 15, 'plot', true);
[0.016] >> mhrv: Processing record db/mitdb/111 (ch. 1)...
[0.016] >> mhrv: Signal duration: 00:30:05.555 [HH:mm:ss.ms]
[0.047] >> mhrv: Analyzing window 1 of 2...
[0.047] >> mhrv: [1/2] Detecting RR intervals from ECG... 1046 intervals detected.
[0.422] >> mhrv: [1/2] Removing ectopic intervals... 13 intervals removed.
[0.438] >> mhrv: [1/2] Calculating time-domain metrics...
[0.469] >> mhrv: [1/2] Calculating frequency-domain metrics...
[0.656] >> mhrv: [1/2] Calculating nonlinear metrics...

[0.750] >> mhrv: ERROR Analyzing window 1 of 2 in record db/mitdb/111:
The matrix dimensions must be consistent.

@avivrosenberg
Copy link
Member

Hi,

I can't reproduce this on my setup. Here's what I get:

>> mhrv.mhrv('db/mitdb/111', 'window_minutes', 15, 'plot', true);
[0.030] >> mhrv: Processing record db/mitdb/111 (ch. 1)...
[0.030] >> mhrv: Signal duration: 00:30:05.555 [HH:mm:ss.ms]
[0.030] >> mhrv: Analyzing window 1 of 2...
[0.030] >> mhrv: [1/2] Detecting RR intervals from ECG... 1046 intervals detected.
[0.400] >> mhrv: [1/2] Removing ectopic intervals... 13 intervals removed.
[0.420] >> mhrv: [1/2] Calculating time-domain metrics...
[0.440] >> mhrv: [1/2] Calculating frequency-domain metrics...
[0.720] >> mhrv: [1/2] Calculating nonlinear metrics...
[0.840] >> mhrv: [1/2] Calculating fragmentation metrics...
[0.960] >> mhrv: Analyzing window 2 of 2...
[0.960] >> mhrv: [2/2] Detecting RR intervals from ECG... 1065 intervals detected.
[1.310] >> mhrv: [2/2] Removing ectopic intervals... 4 intervals removed.
[1.320] >> mhrv: [2/2] Calculating time-domain metrics...
[1.330] >> mhrv: [2/2] Calculating frequency-domain metrics...
[1.480] >> mhrv: [2/2] Calculating nonlinear metrics...
[1.540] >> mhrv: [2/2] Calculating fragmentation metrics...
[1.590] >> mhrv: Building statistics table...
[1.620] >> mhrv: Displaying Results...
                RR       NN      AVNN      SDNN      RMSSD      pNN50       SEM      BETA_LOMB    HF_NORM_LOMB    HF_PEAK_LOMB    HF_POWER_LOMB    LF_NORM_LOMB    LF_PEAK_LOMB    LF_POWER_LOMB    LF_TO_HF_LOMB    TOTAL_POWER_LOMB    VLF_NORM_LOMB    VLF_POWER_LOMB      SD1       SD2       alpha1     alpha2      SampEn        PIP        IALS        PSS       PAS  
              ______    ____    ______    ______    _______    _______    _______    _________    ____________    ____________    _____________    ____________    ____________    _____________    _____________    ________________    _____________    ______________    _______    ______    ________    _______    _________    _______    _________    ______    ______

    1           1046    1033    858.95    30.958     33.598      14.05    0.96322     -1.1881        63.899         0.16744          443.95            6.6518        0.056809         46.214            0.1041            694.76            25.832            179.47         23.769     36.77     0.64751    0.69834       1.8402     52.662       0.5281    60.213     11.81
    2           1065    1061    841.79    40.042     31.725     12.075     1.2293     -1.4542        51.529         0.16744          394.82            6.7584        0.044849         51.783           0.13116            766.21            35.367            270.99         22.444     51.96     0.70254    0.93526       1.8466     51.555      0.51698    55.702    14.138
    Mean      1055.5    1047    850.37      35.5     32.662     13.063     1.0963     -1.3212        57.714         0.16744          419.38            6.7051        0.050829         48.999           0.11763            730.48              30.6            225.23         23.106    44.365     0.67502     0.8168       1.8434     52.109      0.52254    57.958    12.974
    SE           9.5      14     8.581    4.5421    0.93663    0.98746    0.13305     0.13306        6.1852               0          24.564          0.053267       0.0059799         2.7844          0.013529            35.724            4.7674            45.757        0.66276    7.5954    0.027515    0.11846    0.0032216    0.55351    0.0055598    2.2554    1.1637
    Median    1055.5    1047    850.37      35.5     32.662     13.063     1.0963     -1.3212        57.714         0.16744          419.38            6.7051        0.050829         48.999           0.11763            730.48              30.6            225.23         23.106    44.365     0.67502     0.8168       1.8434     52.109      0.52254    57.958    12.974

[1.660] >> mhrv: Generating plots...
[3.430] >> mhrv: Finished processing record db/mitdb/111.

I noticed you're calling with mhrv(...) instead of mhrv.mhrv(...). Are you on the latest version?

Also, I can only test this with the MATLAB verison I have right now, 2018a. Perhaps you're experiencing some issue due to a different MATLAB version?
However, I don't really use MATLAB anymore, so unfortunately my availability to check this on other versions is very limited at the moment.

@cpp1203
Copy link
Author

cpp1203 commented Apr 19, 2020

你好

我无法在我的设置中重现此内容。这是我得到的:

>> mhrv.mhrv('db/mitdb/111', 'window_minutes', 15, 'plot', true);
[0.030] >> mhrv: Processing record db/mitdb/111 (ch. 1)...
[0.030] >> mhrv: Signal duration: 00:30:05.555 [HH:mm:ss.ms]
[0.030] >> mhrv: Analyzing window 1 of 2...
[0.030] >> mhrv: [1/2] Detecting RR intervals from ECG... 1046 intervals detected.
[0.400] >> mhrv: [1/2] Removing ectopic intervals... 13 intervals removed.
[0.420] >> mhrv: [1/2] Calculating time-domain metrics...
[0.440] >> mhrv: [1/2] Calculating frequency-domain metrics...
[0.720] >> mhrv: [1/2] Calculating nonlinear metrics...
[0.840] >> mhrv: [1/2] Calculating fragmentation metrics...
[0.960] >> mhrv: Analyzing window 2 of 2...
[0.960] >> mhrv: [2/2] Detecting RR intervals from ECG... 1065 intervals detected.
[1.310] >> mhrv: [2/2] Removing ectopic intervals... 4 intervals removed.
[1.320] >> mhrv: [2/2] Calculating time-domain metrics...
[1.330] >> mhrv: [2/2] Calculating frequency-domain metrics...
[1.480] >> mhrv: [2/2] Calculating nonlinear metrics...
[1.540] >> mhrv: [2/2] Calculating fragmentation metrics...
[1.590] >> mhrv: Building statistics table...
[1.620] >> mhrv: Displaying Results...
                RR       NN      AVNN      SDNN      RMSSD      pNN50       SEM      BETA_LOMB    HF_NORM_LOMB    HF_PEAK_LOMB    HF_POWER_LOMB    LF_NORM_LOMB    LF_PEAK_LOMB    LF_POWER_LOMB    LF_TO_HF_LOMB    TOTAL_POWER_LOMB    VLF_NORM_LOMB    VLF_POWER_LOMB      SD1       SD2       alpha1     alpha2      SampEn        PIP        IALS        PSS       PAS  
              ______    ____    ______    ______    _______    _______    _______    _________    ____________    ____________    _____________    ____________    ____________    _____________    _____________    ________________    _____________    ______________    _______    ______    ________    _______    _________    _______    _________    ______    ______

    1           1046    1033    858.95    30.958     33.598      14.05    0.96322     -1.1881        63.899         0.16744          443.95            6.6518        0.056809         46.214            0.1041            694.76            25.832            179.47         23.769     36.77     0.64751    0.69834       1.8402     52.662       0.5281    60.213     11.81
    2           1065    1061    841.79    40.042     31.725     12.075     1.2293     -1.4542        51.529         0.16744          394.82            6.7584        0.044849         51.783           0.13116            766.21            35.367            270.99         22.444     51.96     0.70254    0.93526       1.8466     51.555      0.51698    55.702    14.138
    Mean      1055.5    1047    850.37      35.5     32.662     13.063     1.0963     -1.3212        57.714         0.16744          419.38            6.7051        0.050829         48.999           0.11763            730.48              30.6            225.23         23.106    44.365     0.67502     0.8168       1.8434     52.109      0.52254    57.958    12.974
    SE           9.5      14     8.581    4.5421    0.93663    0.98746    0.13305     0.13306        6.1852               0          24.564          0.053267       0.0059799         2.7844          0.013529            35.724            4.7674            45.757        0.66276    7.5954    0.027515    0.11846    0.0032216    0.55351    0.0055598    2.2554    1.1637
    Median    1055.5    1047    850.37      35.5     32.662     13.063     1.0963     -1.3212        57.714         0.16744          419.38            6.7051        0.050829         48.999           0.11763            730.48              30.6            225.23         23.106    44.365     0.67502     0.8168       1.8434     52.109      0.52254    57.958    12.974

[1.660] >> mhrv: Generating plots...
[3.430] >> mhrv: Finished processing record db/mitdb/111.

我注意到您正在致电mhrv(...)而不是mhrv.mhrv(...)。您使用的是最新版本吗?

另外,我只能使用我现在拥有的MATLAB版本2018a对此进行测试。也许由于MATLAB版本不同,您遇到了一些问题?
但是,我真的不再使用MATLAB,因此很遗憾,目前我无法在其他版本上进行检查。

Thank you very much for your prompt answers, I have resolved this issue.
Hope you work well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants