"Jos " <DELjos@jasenDEL.nl> wrote in message <email@example.com>... > "Dani " <firstname.lastname@example.org> wrote in message > <email@example.com>... > > Hi. > > I need to read a text file by lines, storing the result in a > > cell array of string like the textread function does. The > > problem is each line is compound of various strings > > separated by whitespaces, and I want to retrieve the whole > > content of each line, not as separated strings. > > I think it can't be done with textread so I've tried with > > textscan. But now the problem is that texscan returns a cel > > array and I need a cell array of strings. How could I > > convert it to an array of strings? > > Thanks a lot. > > Use the proper delimiter: > > S = textread('file.txt','%s','delimiter','\n') > > hth > Jos > Thank you. I thought textread only accepted filename and format parameters.