|
|
Re: Access to float coordinates in a 3D matrix
Posted:
Dec 3, 2012 5:16 PM
|
|
"Javier " <javsanzperez@gmail.com> wrote in message news:k9i87n$inl$1@newscl01ah.mathworks.com... > Hi, I have several 3D lines to analyze a structure. The problem is that > these coordinates aren't integer, for example 1.9 and I have the error: > Subscript indices must either be real positive integers or logicals. > > I don't want to ceil, floor or round, cause if I do this the lines are > modified, how could I access to these coordinates without changing the > line?
There's no such thing as the 1.9th element of a matrix in MATLAB. You will need to either locate the element "closest to" your desired element (for some definition of "closest to") or perhaps interpolate between the 1st element and the 2nd element.
-- Steve Lord slord@mathworks.com To contact Technical Support use the Contact Us link on http://www.mathworks.com
|
|