|
Hi Jeremy,
Embedded MATLAB does not support matrices of dynamically changing size.
This means that Embedded MATLAB must be able to figure out the size of the
expression "1:zig_zag_length_m". The only way it can do that is if
zig_zag_length is a constant. You can make it constant by supplying it as a
non-tunable parameter, or simply by defining it as a constant in your
function:
zig_zag_length = 3;
Hope this helps,
Fred
"Jeremy Wells" <jrwells@qinetiq.com.au> wrote in message
news:g3uohk$s2f$1@fred.mathworks.com...
> ImageAnalyst <imageanalyst@mailinator.com> wrote in message
> <ccae6d11-a2f0-41ee-9537-
> ac058db902f1@f36g2000hsa.googlegroups.com>...
>> On Jun 25, 7:33=A0pm, "Jeremy Wells"
> <jrwe...@qinetiq.com.au> wrote:
>> > I am trying to place a variable into an embedded matlab
>> > block within a block processing module, to allow me to
>> > modify the amount of compression that I can apply to
> each
>> > block. =A0I keep getting an error "size of index
> expression
>> > no statically known". =A0As the size of the array will
> depend
>> > on teh amount of compression that I apply. =A0Is there
> any
>> > way around this?
>> ----------------------------------------------------------
> -----------------=
>> ---
>> Jeremy:
>> Can you give the actual error message? (Seems doubtful
> that The
>> Mathworks would give such a grammatically incorrect
> message but I
>> guess it's possible, so I was wondering if you could
> actually do a
>> copy and paste this time). Can you give a traceback of
> the error
>> messages as listed in the command window (again, via copy
> & paste),
>> because I have no idea what function generated the
> error? Also, what
>> do you mean by "block"? Do you mean a block of code,
> like an "if"
>> block, or a block of the image (a sub-rectangle) so that
> you're going
>> to process the image in a block-wise fashion like is
> sometimes done
>> (for example in locally adaptive histogram equalization)?
>> Regards,
>> ImageAnalyst
>
> Here are the messages, cut and pasted. The second part
> refers to the array that I am trying to modify with the
> variable "zig_zag_length_m". I am using the Block
> Processing functinality under Utilities in the Video and
> Image Processing Blocksets. So it is block as in sub-
> rectangle of an image
>
> Error mesage:
>
> Size of index expression is not statically known.
>
> Function 'Encoder2/Block Processing/Block iterator/sub-
> block process/Transform coder/Embedded MATLAB Function'
> (#37.3334.3352), line 107, column 7:
> "1:zig_zag_length_m"
>
> Command window error messages:
>
> ??? Error using ==> sf
> Errors occurred during parsing of Embedded MATLAB
> function 'Encoder2/Block
> Processing/Block iterator/sub-block process/Transform
> coder/Embedded
> MATLAB Function'(#37)
>
>
>
|