Path: news.mathworks.com!newsfeed-00.mathworks.com!news.kjsl.com!feeder.erje.net!us.feeder.erje.net!news2.arglkargh.de!news.mixmin.net!aioe.org!.POSTED!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Access to float coordinates in a 3D matrix
Date: Mon, 03 Dec 2012 07:19:02 -0600
Organization: Aioe.org NNTP Server
Lines: 13
Message-ID: <k9i8s3$vp5$1@speranza.aioe.org>
References: <k9i87n$inl$1@newscl01ah.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: d9rkuHWV+LYy/jluNrFC/w.user.speranza.aioe.org
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: abuse@aioe.org
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/17.0 Thunderbird/17.0
X-Notice: Filtered by postfilter v. 0.8.2
Xref: news.mathworks.com comp.soft-sys.matlab:784040

On 12/3/2012 7:08 AM, Javier wrote:
> 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?

you seem to be using the value itself as an index.
use the location of the value as index. Not the value itself.

--Nasser