Array dimensions must match for binary array op. error how to solve this problem thanks for all

12 次查看(过去 30 天)

采纳的回答

Star Strider
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
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
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 CenterFile Exchange 中查找有关 Matrix Indexing 的更多信息

产品


版本

R2015a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by