Sample Code for 3 Support Vectors

% Sample Code for 3 support vector version

s1 = [ 10 8 1 ];

s2 = [ 8 10 1 ];
s3 = [ 1 1 1 ];



A = [ sum(s1.*s1) sum(s2.*s1) sum(s3.*s1) ; sum(s1.*s2) sum(s2.*s2) sum(s3.*s2) ; sum(s1.*s3) sum(s2.*s3) sum(s3.*s3) ]
Y = [ +1 +1 -1 ]
X = Y/A


p = X(1)
q = X(2)
r = X(3)


W = [ p*s1 + q*s2 + r*s3 ]

Complete and Continue