Wednesday, April 1, 2015

[MALAB] Textscan until end-of-line (or \n)

fp = fopen('filename.txt','rt');

% Read N strings
str = textscan(fp, '%[^\m]', N);

% Read whole strings
str = textscan(fp, '%[^\m]');

fclose(fp);

No comments:

Post a Comment