Path: news.mathworks.com!not-for-mail
From: "Freda " <fredawerdiger@hotmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: counting dots
Date: Mon, 19 Jan 2009 03:09:02 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 28
Message-ID: <gl0qse$8jn$1@fred.mathworks.com>
References: <gkug9i$2b4$1@fred.mathworks.com> <gkuiim$t29$1@fred.mathworks.com>
Reply-To: "Freda " <fredawerdiger@hotmail.com>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1232334542 8823 172.30.248.37 (19 Jan 2009 03:09:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 19 Jan 2009 03:09:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1497428
Xref: news.mathworks.com comp.soft-sys.matlab:512372


"Sadik " <sadik.hava@gmail.com> wrote in message <gkuiim$t29$1@fred.mathworks.com>...
> "Freda " <fredawerdiger@hotmail.com> wrote in message <gkug9i$2b4$1@fred.mathworks.com>...
> > Take this plot of complex numbers:
> > 
> > one=rand(128);
> > two=rand(128).*pi;
> > comp=one.*exp(i.*two);
> > re=real(comp);
> > im=imag(comp);
> > plot(re,im,'k.','MarkerSize',4)
> > 
> > How do i find out the number of dots in a given section?
> > ie, counting dots.
> 
> Hello Freda,
> 
> You can easily filter the vector comp with respect to the given section so as to give the number of points in that section. But the section should clearly be defined.
> 
> As an example, if the section will be "Those points whose magnitudes are less than 0.5", you can even filter the vector one rather than comp. So the number of points in that section would be: length(sum(one<0.5)).
> 
> Hope this helps.


Hi,
i don't really understand. Does this count the number of points in a section of the plot? How, if your using the original vector? Bc the real part of the complex function isn't the same as the vector 'one'. also, why the sum(one<0.5)???

thanks,
Freda.