From: Matthew on
I have the following code:
numnonzerocols is set in code above this:

if (numnonzerocols > 0)
m = size(Input,1); %Known Size
ncols = numnonzerocols;

%Create m_WorkingMatIn
assert(ncols <= 39);
m_workingmatin = zeros(m,ncols);
m_workingmatout = zeros(ncols,m);

When I go to run it I get an error 'Assertion Failed', I added the assertion in order to set the upper bounds on the ncols variable otherwise I get an error when I run the block that the upper limits are unbounded.

Any ideas? I want to be able to set the m_workingmatin matrix size dynamically in this Embedded Matlab Function.
From: Michael Hosea on
Apparently, numnonzerocols > 39 at run-time. If 39 is a correct upper
bound, then the code that computes numnonzerocols probably has a bug in it.
If it's not the correct upper bound, increase from 39 to whatever is
appropriate.
--
Mike

"Matthew " <mjreiland(a)gmail.com> wrote in message
news:hkc58t$mie$1(a)fred.mathworks.com...
>I have the following code:
> numnonzerocols is set in code above this:
>
> if (numnonzerocols > 0) m = size(Input,1); %Known Size
> ncols = numnonzerocols;
> %Create m_WorkingMatIn
> assert(ncols <= 39); m_workingmatin = zeros(m,ncols);
> m_workingmatout = zeros(ncols,m);
>
> When I go to run it I get an error 'Assertion Failed', I added the
> assertion in order to set the upper bounds on the ncols variable otherwise
> I get an error when I run the block that the upper limits are unbounded.
>
> Any ideas? I want to be able to set the m_workingmatin matrix size
> dynamically in this Embedded Matlab Function.