Issue with my script Matrix dimensions must agree
Show older comments
My script returns a matrix error. I'm a first time matlab user and have no idea how to fix the issue but I assume it is simple. I've attached the entire script "FFT_Final_1CH" as will as the image file it is meant to analyse.
Matrix dimensions must agree.
Error in graphImageFinal (line 45) impfMask = impf.*mask;
Error in FFT_Final_1CH (line 165) [A2, Int2, aMax2, Scale2, EntFFT(l), OIFor(l)] = graphImageFinal(im1,...
6 Comments
Walter Roberson
on 5 Feb 2018
Without looking at the code, I can predict that probably mask is 2D bug impf is probably 3D (RGB)
Arash Tehrani
on 5 Feb 2018
Walter Roberson
on 5 Feb 2018
If it is the problem I suspect then
impfMask = impf.*mask(:,:,[1 1 1]);
Arash Tehrani
on 5 Feb 2018
Walter Roberson
on 6 Feb 2018
Edited: Walter Roberson
on 6 Feb 2018
That problem does not occur on the random tif images I had sitting around. I will need a sample image from you to test with. Also, are there any non-default settings to use in the input dialog?
Arash Tehrani
on 6 Feb 2018
Answers (0)
Categories
Find more on Image Arithmetic in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!