Issue with my script Matrix dimensions must agree

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

Without looking at the code, I can predict that probably mask is 2D bug impf is probably 3D (RGB)
Thank you for the input. Is it possible to provide a fix for this? I unfortunately have no expertise in writing the code necessary.
Thanks in advance,
If it is the problem I suspect then
impfMask = impf.*mask(:,:,[1 1 1]);
unfortunately that didn't help. Returned the following error
Array dimensions must match for binary array op.
Error in graphImageFinal (line 45) impfMask = impf.*mask(:,:,[1 1 1]);
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?
Here is the TIFF image I am using. There are no non-default settings. I have also attached the instructions that came with the script if it helps.

Sign in to comment.

Answers (0)

Tags

Asked:

on 5 Feb 2018

Commented:

on 6 Feb 2018

Community Treasure Hunt

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

Start Hunting!