clear all

fnames = {'llcdirafreq1.s1d','xyndirrfreq1.s1d','llcdirafreq2.s2d','xyndirrfreq2.s2d'};


for j=1:length(fnames)
    
    spfile = [fnames{j}];

    S = swan_io_spectrum(spfile);
    
    S.platform_name = addrowcol(num2str([1:S.mxc]'),0,-1,'noitats'); % test

    ncfile = [filepathstrname(spfile),'_matlab.nc'];
    delete(ncfile)
    swan_io_spectrum2nc(S,ncfile)

end
