I can not figure out why my circle is invisiable when I plot it (It is a regression). Am I missing something? It used to work earlier.
x = [5; 4; -1; 1];y = [3; 5; 2; 1];% circle's equation: x^2+y^2 = 2xc1+2yc2+c3
a = [2.*x,2.*y,ones(length(x),1)];b = [x.^2 + y.^2];c = a\b;x_m = c(1)/2;y_m = c(2)/2;r = sqrt(x_m^2 + y_m^2 -c(3));% plot data points
plot(x,y,'o')hold on% plot center
plot(x_m,y_m,'+')% plot circle
circle(x_m,y_m,r)hold off
Best Answer