I have a file with 3 columns of data.
Here is just a sample of what the data looks like (there are many more rows):
265.54555556 1.09773e-46 1.04772e-23265.54611111 3.60808e-47 6.00673e-24265.54666667 1.25291e-46 1.11934e-23
I want to read this into Matlab (with the numbers formatted with the same precision) and be able to work with specific columns. This is what I have. I'm not sure what is going wrong or if I even am reading in the numbers properly for their values.
fileID = fopen(file,'r');formatSpec='%f %12.5e %12.5e';sizeA = [Inf 3];A = fscan(fileID,formatSpec,sizeA);disp(A);
Additionally, once I have this working, how would I select a specific column?
Thanks!
Best Answer