From: "Natalie Sin Hwee " <>
Newsgroups: comp.soft-sys.matlab
Subject: Re: finding distances that satisfy the equation ? (confused :'( , please help)
Date: Mon, 29 Mar 2010 10:01:07 +0000 (UTC)
Organization: Imperial College
Lines: 44
Message-ID: <hoptp3$c4p$>
References: <hoo666$8u3$> <hoo796$od9$>
Reply-To: "Natalie Sin Hwee " <>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: 1269856867 12441 (29 Mar 2010 10:01:07 GMT)
NNTP-Posting-Date: Mon, 29 Mar 2010 10:01:07 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 2069448
Xref: comp.soft-sys.matlab:621418

> a hint:
> - create a list [IR,IC] of those nodes only that satisfy your condition...
> - then, compute their distance in a simple loop...
>      [ir,ic]=find(sect1);
>      lst=[ir,ic];
> % now, loop through your list LST...
> just a thought...
> us


thanks us!! i did that and it works!!!!! awesome!! ive added in:

sect1=((0<theta) & (theta<(0.25*pi)));

[g1,k1]=find(sect1>=1); first=[g1,k1];

for n=1:L1

and that returns me a the 'distance between nodes' corresponding to what i've found in 'first' - column1 wrt to column 2 'nodes'

any idea how i can separate them out into the different 'nodes' wrt to column 1. e.g.

node 1 + 2,7,8,9,(random whatever it has given me)

my aim is to find,

the nearest node to each node within that angle (0 to pi/4)...

(will be repeated as applied to the 8 sectors in the circle) 

*omg sorry this is getting more and more confusing !! ^^ 

thanks lots just for reading through it!