function csv2mat(filename)

M = dlmread(filename,',',1,2);
newfilename = strrep(filename,'.csv','')
save(newfilename,'M');