MATLAB: How to plot two functions in the same graph

functionsgraphplot

I have to show that the functions f(x)=x/10 and g(x)=cos(x) intersect at least twice the range [-3,3]. Can anybody help me?

Best Answer

Iris, use
x = -3:0.1:3;
f = x./10;
g = cos(x);
plot(x,f,x,g)