(Edited) We have a string and want it to be repeated, say 5 times, namely from
str = '%s ';
to
'%s %s %s %s %s '
Question 1: How to specify in the the format argument in textscan()
function, to create a new line every 5 strings? I'm looking for something like [repmat('%s', 1, 5) '%*[^\n]']
(this doesn't work).
Question 2: the [data] = textscan(fid, [repmat('%s', 1, 5) '%*[^\n]'], 'Delimiter',{','},'headerLines', 1)
currently gives me a 1
xn
cell - how to convert this into a m
xn
matrix?;