function [label,weights,accuracy]=solvesvm(X,Y,model)
n=size(X,1);
nClass=size(Y,2);
label=zeros(nClass,n);
weights=zeros(nClass,n);
accuracy=zeros(nClass,1);
for i=1:nClass
    [label(i,:),accuracy(i,:),weights(i,:)]=predict(Y(:,i),X,model(i));
end