From: Martin on 6 Feb 2007 10:10 Martin wrote: > > > Hi > > I have the following code in a for-loop: > lineX = ceil(i/blocksh)*bw; > > lineYdown=0; lineYup=0; > lineYdown = ceil( inversmatrix(i)/blocksw )*bh; > lineYup = lineYdown-bh+1; > lineXright = lineX; > lineXleft = lineXright-bw+1; > > > frameWithMotion = image( lineYup:lineYdown, lineXleft:lineXright ); > > the last line gives this error: > Size of index expression is not statically known > > How can i workaround this? > > thanx in advance and yes, i'm working in embedded Matlab function, Simulink
From: M on 6 Feb 2007 10:16 J�r�me wrote: > > > Hi, > > read this : > > <http://www.mathworks.com/support/solutions/data/1-U99FV.html> > > J�r�me > thanx for this :)
From: Martin on 6 Feb 2007 13:59 > J�r�me wrote: >> >> >> Hi, >> >> read this : >> >> <http://www.mathworks.com/support/solutions/data/1-U99FV.html> >> >> J�r�me >> > > thanx for this :) Is there a way to work around this for the moment, using a 2D matrix like the example above?
From: Martin on 9 Feb 2007 11:47 Martin wrote: > > >> J�r�me wrote: >>> >>> >>> Hi, >>> >>> read this : >>> >>> <http://www.mathworks.com/support/solutions/data/1-U99FV.html> >>> >>> J�r�me >>> ehm, I see that this article is dated 'Date Last Modified: 25 Apr 2005' and I'm working on a R2006B release. Should this release have this problem fixed?
From: Steven Lord on 9 Feb 2007 14:39 "Martin" <halvorsen82(a)hotmail.com> wrote in message news:ef4d0f6.4(a)webcrossing.raydaftYaTP... > Martin wrote: >> >> >>> J�r�me wrote: >>>> >>>> >>>> Hi, >>>> >>>> read this : >>>> >>>> <http://www.mathworks.com/support/solutions/data/1-U99FV.html> >>>> >>>> J�r�me >>>> > ehm, I see that this article is dated 'Date Last Modified: 25 Apr > 2005' and I'm working on a R2006B release. Should this release have > this problem fixed? 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
|
Next
|
Last
Pages: 1 2 Prev: textscan command problem Next: Figure & Axes plotting, 3-D OpenGL rendering? |