Code:
[file_name, ~] = uigetfile('.txt','Open Calibration File'); A = readtable(file_name); slopes = table2array(A(:,1)); intercepts = table2array(A(:,2)); unitss = table2array(A(:,3)); *t.Data = [slopes,intercepts,unitss];* _this is the error line_
slopes and intercepts are both 4×1 double, and unitss is 4×1 cell with text inside. I've already tried cellstr on unitss, and I've double checked the sizes. My code works when I remove unitss, so I know that is part of the problem! Can anyone tell me how to fix it?
Best Answer