I am facing a logical problem like,
for i = 1:N
fun(i) = mean((y(i)-x(i))^2);
after optimization we get values of a,b and value of data properly ,but now I want to plot data. But here data is a single value. How i can proceed it?