MATLAB Answers


Error with Blkproc.m

Asked by Pooja
on 23 Jul 2013

I am getting error as follows how to solve it?

??? Subscripted assignment dimension mismatch.

Error in ==> blkproc at 89 aa(border(1)+(1:ma),border(2)+(1:na)) = a;

Error in ==> func_DCTJPEG at 35 Coef=blkproc(ImageSub,[8,8],'dct2(OriginalImage)');




No products are associated with this question.

2 Answers

Answer by Lokesh Ravindranathan on 23 Jul 2013

This solution explains the reason for the error message. In short, you are trying to execute something which shouldn't be allowed.


Answer by Jan Simon
on 23 Jul 2013

Check your code again:

Coef = blkproc(ImageSub, [8,8], 'dct2(OriginalImage)');

The provided function is a string, but blkproc expects a function handle. How could Matlab know, what "OriginalImage" is?

Please post the relevant part of the code to allow a more explicit help.


Jan Simon
on 26 Jul 2013

@Pooja: I do not understand what the string should achieve. I cannot find a corresponding explanation if the help text. In consequence I cannot suggest an alternative.

on 27 Jul 2013

Its for jpeg compression.I am also getting an error of using too many o/p arguments for another program.How to rectify that error?

Jan Simon
on 27 Jul 2013

@Pooja: Even knowing the general purpose doe not allow to suggest a specific function.

Please open a new thread for a new question. Add the concerned code there and post a copy of the complete error message.

Discover MakerZone

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

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!