From: Martin on
> Steven Lord wrote:
>
> I believe this refers to an error in the documentation for the
> Embedded
> MATLAB function block, and as stated in the solution section of
> that page
> the documentation error has been corrected in Release 14 with
> Service Pack
> 2. However, as far as I know the Embedded MATLAB function block
> still does
> not allow code where you attempt to index into a variable with an
> index
> expression whose size varies at runtime. By the description of the
>
> limitations on indexing in Embedded MATLAB blocks on this page:
>
> <http://www.mathworks.com/access/helpdesk/help/toolbox/simulink/slref/index.html?/access/helpdesk/help/toolbox/simulink/slref/bqthivl-1.html>
>
> I do not believe there is a way to do this, unless perhaps you know
> the
> maximum size of the data you want to extract, you preallocate your
> frameWithMotion matrix to that size, and you assign elements of
> your array
> named image into the appropriate elements of frameWithMotion.
>
> --
> Steve Lord
> slord(a)mathworks.com

Thanx for taking time to answer, Steve.
do I preallocate placing 'frameWithMotion = zeros(12, 15);' at the
top of the embedded function? I did so, and that gave me:
Size of index expression is not statically known.

Function 'See It/Embedded MATLAB Function' (#544.1550.1567), line 53,
column 38:
"lineYup:lineYdown"

What I try to do is to make my own block processing function. I have
a video with estimated motion in some 12x15 blocks. And I only want
to change the block with motion, with the previous frames same
blocknumber. Using a block processsing block on the whole image would
take a lot more time.