Array dimensions must match for binary array op. error how to solve this problem thanks for all
조회 수: 11 (최근 30일)
이전 댓글 표시
댓글 수: 0
채택된 답변
Star Strider
2019년 6월 19일
Apparently ‘InputImage’ does not have the same row, column (and perhaps third-dimension) sizes as ‘ReconstructedImage’.
You have to determine that.
The solution depends on what you want as the end result.
댓글 수: 8
Star Strider
2019년 6월 19일
First:
RIsize = size(ReconstructedImage);
IIsize = size(InputImage);
Then, compare them. For images, try this:
Test = @(I1size,I2size) all((I1size(1:2) == I2size(1:2)) & (numel(I1size) == numel(I2size))); % True If Image Dimensions Are The Same
Check = Test(RIsize,IIsize)
RAJESH RAJAN
2020년 10월 9일
Dear Star Strider how to check our images have exactly the same row and column sizes, and the same number of dimensions (2 or 3). ?
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Matrix Indexing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!