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) Related SolutionsMATLAB: Plotting two(function) curve in same figure?how plot(x,y1)hold onplot(x,y2)%orplot(x,y1,x,y2)%orplotyy(x,y1,x,y2) MATLAB: How can i represent 2 functions on the same graph One option is the fimplicit (link) function:f1 = @(x,y) 2*x.^3-5*x-2*y.^3+1;f2 = @(x,y) x.^4+4*y.^4.*y-6;figure(1)fimplicit(f1, [-10 10 -10 10])hold onfimplicit(f2, [-10 10 -10 10])hold offlegend('f_1(x,y)', 'f_2(x,y)', 'Location','NW') Related QuestionHow to draw the graph of a function that has different structure in its different domainHow to color an area at plot surface…Plotting 2 graphs on the same axesError: “Invalid first data argument” (when attempting to plot)
Best Answer