By all means, the solution method above will work. However, as your function increases in complexity, that command becomes more and more expensive. Try defining your domain x, then, as a vector:
MATLAB code b0=3; b1=4; x= linspace(xmin,xmax, n); % Adapt n for resolution of graph y= b0-b1*x; plot(x,y)
How do I get that into the same graphs? I have points for my data and the equation above is the linear regression. Ezplot gave me two graphs. :(. I want both the points and the linear equation graphed in one figure.