Im trying to use the linspace command (in the form of x1,x2,n)on the second column of a previously created array, so that it creates vectors from the highest value to the lowest value but I keep getting an error message saying "inputs must be scalars". Here is the section of my code:
A=table2array(Data);
SSD = A(:,3)-SimulatedY.^2;
SSD = sum(SSD);
Xplot(icount,jcount,kcount) = i;
Yplot(icount,jcount,kcount) = j;
Tplot(icount,jcount,kcount) = k;
Zplot(icount,jcount, kcount) = SSD;
if SSD < MinimumSSD
MinimumSSD = SSD;
Bestparams1 = i;
Bestparams2 = j;
Bestparams3 = k;
end
end
end
end
figure
hold on
plot(A(:,1),A(:,3),'o') %plot actual data
a =linspace(min(A(:,2)):max(A(:,2)),30);
Best Answer