Why isn't my Perceptron learning?

I'm writing a Perceptron to determine whether a number is point is above or below a line. It keeps saying that every point is above the line. Any ideas?

The code is posted here: http://forums.codeguru.com/showthread.php?543183-Why-isn-t-my-Perceptron-learning

Thanks!

Lexi

Why are you calling srand inside a loop where you generate random numbers?
Moving the srand call outside of the loop fixed it. Thanks!
Topic archived. No new replies allowed.