Readtable and Readmatrix Ignore Specified Range and Produce Extra Variables
I have this very simple code:
stupid_matlab = readtable(‘PATH’, ‘ReadVariableNames’, false, ‘Range’, strcat(‘C2:D’, string(ri_length)));
However, it completely ignores the column portion of the range I give it. Changing the number part of the specified range changes the number of rows, but it always produces four extra columns. If I specify C2:C3, I get five columns. If I specify C2:D3, I get six columns. I have not idea where it is getting the extra columns from. I have also tried "readmatrix" and it does the exact same thing. I’ve attatched the .csv, but I’ve opened it directly and in excel and don’t see anything wrong.I have this very simple code:
stupid_matlab = readtable(‘PATH’, ‘ReadVariableNames’, false, ‘Range’, strcat(‘C2:D’, string(ri_length)));
However, it completely ignores the column portion of the range I give it. Changing the number part of the specified range changes the number of rows, but it always produces four extra columns. If I specify C2:C3, I get five columns. If I specify C2:D3, I get six columns. I have not idea where it is getting the extra columns from. I have also tried "readmatrix" and it does the exact same thing. I’ve attatched the .csv, but I’ve opened it directly and in excel and don’t see anything wrong. I have this very simple code:
stupid_matlab = readtable(‘PATH’, ‘ReadVariableNames’, false, ‘Range’, strcat(‘C2:D’, string(ri_length)));
However, it completely ignores the column portion of the range I give it. Changing the number part of the specified range changes the number of rows, but it always produces four extra columns. If I specify C2:C3, I get five columns. If I specify C2:D3, I get six columns. I have not idea where it is getting the extra columns from. I have also tried "readmatrix" and it does the exact same thing. I’ve attatched the .csv, but I’ve opened it directly and in excel and don’t see anything wrong. readtable, readmatrix, range MATLAB Answers — New Questions