LabeoTech / Umit

universal mesoscale Imaging Toolbox
GNU General Public License v3.0
9 stars 3 forks source link

[BUG] - analysis Corr Matrix. #37

Closed Zak-Eckert closed 2 years ago

Zak-Eckert commented 2 years ago

Hello, I have been trying to generate a correlation matrix which uses multiple baselines from multiple animals, then compares it against a post stroke model to determine alterations in atlas assigned regions following stroke. However, I have run into the issue which will not allow it to alter the number of baseline maps. The error is stated as followed:

Error using cat Dimensions of arrays being concatenated are not consistent.

Error in PlotCorrMatrix/updateData (line 299) app.data(i).MatData.data = mean(cat(4,app.matrix_struct(idx).data),4,'omitnan');

Error in PlotCorrMatrix/SetbaselineButtonPushed (line 520) app.updateData;

Error using matlab.ui.control.internal.controller.ComponentController/executeUserCallback (line 410) Error while evaluating Button PrivateButtonPushedFcn.

I was wondering if there is a solution to this, or if there is something that can be done about it. I have also attached an image to see what my error point was

Capture

BrunoOFSouza commented 2 years ago

@Zak-Eckert , Thanks for flagging this issue. It seems that the app fails to average acquisitions with different number of recordings (2 vs 1, in your case).

We will work on it to fix this bug.

BrunoOFSouza commented 2 years ago

The issue was fixed in commit 72b752b3e29dc817b8215cf51016d2110ca37080. The bug was caused when trying to merge two or more acquisitions as a baseline. More precisely, the bug occurred when Matlab tried to concatenate one correlation matrix with dimension N x N (one Recording) with another with dimensions N x N x R (with two or more recordings) .