I want to read a text file called test that contains integers into an array. I keep recieving an error. How do I read a text file into an array?
% This is the code
fileID = fopen('Test.txt','r');formatSpec = '%d %f';sizeA = [2 Inf];A = fscanf(fileID,formatSpec,sizeA);fclose(fileID);
Best Answer