clear all
clc
delimiter=';' ; headerLines=4
formatSpec = '%s%s%s%s%s%s%s%d' daten=fopen('msa02_141121_mscc5_11.erg','r') %textread ('/Users/test.txt','%s', 'delimiter', '\n'); % zeile=textscan(datei,'%s\t',[1,inf]) zeile = textscan(daten,formatSpec,181,'delimiter',';','headerLines',4) fclose(daten);
for i=1:length(zeile{1,1}) tmp=zeile{1,1}{i} tmp=strrep(tmp,'.','_dot') zeile{1,1}(i)=cellstr(tmp); end
for ind=1:size(zeile{1,1},1)
%s.(zeile(i){ind})=magic(length(zeile{ind}))
s.(zeile{1,1}{ind})=magic(size(zeile{1,1}{ind},1))
end