I have the following code that loops over each pixel of a .tif image to predict responses using ensemble of regression models.
X is a 753*6 numeric array which has 6 variables (also columns), and 753 rows. NR = 1380, NC = 1464.
I understand the error's meaning (The dimensions on both sides do not match each other), but I really do not know how to fix it. I imagine the result I need should be a 1380*1464 numeric array.
a = imread('LE71250521999276_b1.tif')[NR,NC] = size(a);Yfit = zeros(NR,NC);for i = 1:NR for j = 1:NC Yfit(i,j) = predict(Mdl1999276,X); end end
ERROR: Assignment has more non-singleton rhs dimensions than non-singleton subscripts
Thank you for helping!!
Best Answer