Even better than xlsread, readtable would be a much better and modern option. If the header line that is skipped actually contains columns names readtable could even parse these. Skipping it, as in the original code: kd = readtable('KD.csv', 'delimiter', ';', 'ReadVariableNames', false, 'HeaderLines', 1);
kd.Properties.VariableNames = {'dt', 'val', 'exch'};
Note that readtable is usually clever enough to detect the delimiter, number of lines to skip and whether or not the variable names are included, so:
kd = readtable('KD.csv');
may be enough.
Best Answer