Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

New to MATLAB?

Error- Subscripted assignment dimension mismatch.

Asked by FIR

FIR (view profile)

on 18 Apr 2013

I have divided image into non overlapping blocks using command

      x=imresize(x,[256 256]);
    [rows columns numberOfColorBands] = size(rgbImage)
    a = blockproc(x,[64 64],fun); 
    %%%%%%%%now to non overlapping blocks
    a1= blkproc(x,[64 64],[2 3],fun);

i get the following error

Subscripted assignment dimension mismatch.

Error in blkproc (line 92) aa(border(1)+(1:ma),border(2)+(1:na)) = a;

Error in news (line 28) a1= blkproc(rgbImage,[64 64],[2 3],fun);

kindly helo to resolve it



FIR (view profile)


No products are associated with this question.

1 Answer

Answer by Walter Roberson

Walter Roberson (view profile)

on 18 Apr 2013

blkproc() and blockproc() are two different routines that process the data fairly differently.

blkproc() has either already been removed from MATLAB or will be removed soon; it is no longer a documented command.

The form of blkproc() you have used is for overlapping blocks, not for the non-overlapping blocks of your comment. The form of blockproc() you have used is for non-overlapping blocks.


Walter Roberson

Walter Roberson (view profile)

Contact us