function [sD sM] = som_train(svmlabel, svmdata, somOptions)

som_size = somOptions.size;
som_lattice = somOptions.lattice;

display('SOM TRAINING');
addpath 'somtoolbox2';
sD = som_data_struct(svmdata,'label',num2str(svmlabel));
assignin('base','sD',sD);
sM = som_make(sD,'msize', som_size,'lattice', som_lattice);

sM = som_autolabel(sM,sD,'vote');

assignin('base','sD',sD);
assignin('base','sM',sM);
display('type ''figure'' before visualisation');
end