Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: for ineqyalities solution.....
Date: Wed, 2 May 2012 06:06:07 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 10
Message-ID: <jnqisf$42g$1@newscl01ah.mathworks.com>
References: <jnqblq$65u$1@newscl01ah.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: www-00-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: newscl01ah.mathworks.com 1335938767 4176 172.30.248.45 (2 May 2012 06:06:07 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Wed, 2 May 2012 06:06:07 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1187260
Xref: news.mathworks.com comp.soft-sys.matlab:766554

"mayank chouksey" wrote in message <jnqblq$65u$1@newscl01ah.mathworks.com>...
> i have a linear equation.........
>  y=m1*x              and some 2D data points.
> 
> I want to check this out that how much of them are lying one side of the line where the point ( X1,Y1 ) is situated........
- - - - - - - - - - - -
 x = data(:,1); y = data(:,2);
 n = sum(sign(y-m1*x)==sign(Y1-m1*X1)); % <-- This many

Roger Stafford