Matlab Code for Pattern Recognition and Machine Learning by Christopher Bishop
chapter 4 p184 -Least squares for classification
This code shows linear class-discriminant function from user's input data.
1.First 10 mouse GUI input clicks are blue circle which belong to CLASS 1
And following 10 mouse GUI input clicks belong to CLASS 2
2. After you finish your data input phase, It would show you green straight line which means linear discriminant function.
Download MATLAB code here :