MATLAB: Problem with textscan in matlab 2016a

textscan

Hi together, i attached a text file and the matlab script. I run the script with matlab2014 and matlab2016a. Why there is a difference in the result. the result with 2014 ist the wanted result.
Thank you for your help.

Best Answer

I’m not certain what problem you are having.
This works for me in R2016a:
fidi = fopen('Rica Test_1.txt','rt');
Ac = textscan(fidi, '%f%f%f%f%f', 'HeaderLines',1, 'CollectOutput',1);
A = cell2mat(Ac);
The cell2mat call converts the cell array ‘Ac’ to double array ‘A’.