Got Questions? Get Answers.
Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
for ineqyalities solution.....

Subject: for ineqyalities solution.....

From: mayank chouksey

Date: 2 May, 2012 04:03:06

Message: 1 of 2

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........

Subject: for ineqyalities solution.....

From: Roger Stafford

Date: 2 May, 2012 06:06:07

Message: 2 of 2

"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

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us