Array dimensions must match for binary array op.
显示 更早的评论
I have two groups of images (patients and control subjects) and I am try to perform a two sample t-test but I keep getting this error ''Array dimensions must match for binary array op.'' even though I checked the dimensions of all my images are they are the same (x=46, y=55, and z=46) and their sizes to are the same (voxel size= 3 x 3 x 3). Please I really need help to solve this problem. I am confused as to what array dimensions they are talking about.
Error in y_GroupAnalysis_Image (line 60)
MaskData = any(DependentVolume,4) .* MaskData; % skip the voxels with all zeros
Error in y_TTest2_Image (line 84)
[b_OLS_brain, t_OLS_brain, TTest2_T, r_OLS_brain, Header] =
y_GroupAnalysis_Image(DependentVolume,Regressors,OutputName,MaskFile,CovariateVolume,Contrast,'T',0,Header);
Error in DPABI_STAT_TOOL>ComputeButton_Callback (line 521)
y_TTest2_Image(S, OutputName, MaskFile, ImageCell, TextCell, PALMSettings);
Error in gui_mainfcn (line 95)
feval(varargin{:});
Error in DPABI_STAT_TOOL (line 42)
gui_mainfcn(gui_State, varargin{:});
Error in matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)DPABI_STAT_TOOL('ComputeButton_Callback',hObject,eventdata,guidata(hObject))
Error while evaluating UIControl Callback.
3 个评论
Mehmed Saad
2020-4-17
Error in y_GroupAnalysis_Image (line 60)
MaskData = any(DependentVolume,4) .* MaskData; % skip the voxels with all zeros
what is initial value of MaskData?
put a break point on this line and see the size of any(DependentVolume,4) and MaskData
Tommy
2020-4-17
MaskData = any(DependentVolume,4) .* MaskData;
The error message indicates that the problem is in this line. Can you be sure that the result of any(DependentVolume,4) has the same number of elements as MaskData?
Elijah Agoalikum
2020-4-17
回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Image Arithmetic 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!