Write a for loop that converts the Data (Data.data) in the text file into matrix of 13 by 31 or 31 by 13.
1 view (last 30 days)
DGM on 12 Apr 2022
This should be one way:
alltext = split(fileread('Textfile.txt'),newline);
allnums = regexp(alltext(1:end-1),'(?<=:\s*)[+-E\d]+','match');
allnums = cellfun(@str2double,allnums);
allnums = reshape(allnums,13,)