I just got it! My x and y arrays have strings in them. I converted the strings to numbers and it worked!
x_d = str2double(x); y_d = str2double(y); poly_fit_coef = polyfit(x_d, y_d, 1);
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!