xValues = linspace(-3,3);
yValues = xValues.^2 - 3;
plot(xValues,yValues)
hold on
plot([-3 3],[0 0])
hold off
x = linspace(2,2,100)
y = sin(2*x)+exp(-x)-1;
% if y = sin(2*x)+e^(-x)-1 : must arise err because unrecognized function
% or variable 'e'.
plot(x,y)
grid on
numRoots = 3
x = linspace(-1,1,100);
y = x.^2+sin(x)-0.5
% if y = x.^2+sin(x.)-0.5 : must arise err because Invalid expression. when calling a function or indexing variable, use parentheses.
% Otherwise, check for mismatched delimiters.
numRoots = 1;
xValues = linspace(-3,3);
yValues = xValues.^2 - 3;
plot(xValues,yValues)
hold on
plot([-3 3],[0 0])
hold off
x = linspace(2,2,100)
y = sin(2*x)+exp(-x)-1;
% if y = sin(2*x)+e^(-x)-1 : must arise err because unrecognized function
% or variable 'e'.
plot(x,y)
grid on
numRoots = 3
x = linspace(-1,1,100);
y = x.^2+sin(x)-0.5
% if y = x.^2+sin(x.)-0.5 : must arise err because Invalid expression. when calling a function or indexing variable, use parentheses.
% Otherwise, check for mismatched delimiters.
numRoots = 1;
xValues = linspace(-3,3);
yValues = xValues.^2 - 3;
plot(xValues,yValues)
hold on
plot([-3 3],[0 0])
hold off
x = linspace(2,2,100)
y = sin(2*x)+exp(-x)-1;
% if y = sin(2*x)+e^(-x)-1 : must arise err because unrecognized function
% or variable 'e'.
plot(x,y)
grid on
numRoots = 3
x = linspace(-1,1,100);
y = x.^2+sin(x)-0.5
% if y = x.^2+sin(x.)-0.5 : must arise err because Invalid expression. when calling a function or indexing variable, use parentheses.
% Otherwise, check for mismatched delimiters.
numRoots = 1;
xValues = linspace(-3,3);
yValues = xValues.^2 - 3;
plot(xValues,yValues)
hold on
plot([-3 3],[0 0])
hold off
x = linspace(2,2,100)
y = sin(2*x)+exp(-x)-1;
% if y = sin(2*x)+e^(-x)-1 : must arise err because unrecognized function
% or variable 'e'.
plot(x,y)
grid on
numRoots = 3