I am trying to plot three functions on the graph; horizontal, y=x, and a sawtooth function. When I plot all three of them, the legend sucsefully displays 3 different colours (one for each function), but the plot itself doesnt distingiuse between the 3 plots and colours two of them the same way. I have tried manuly setting the colours of them different but then the legend disagress agian. Anyone know how to fix this?
x = 0:0.1:16;yClassical = 0*ones(length(x));yVacuum = x;yQuantum = 4.9/2*sawtooth(2*pi/4.9*x)+4.9/2;hold onplot(x, yVacuum, 'lineWidth', 4)plot(x, yClassical, 'lineWidth', 4)plot(x, yQuantum, 'lineWidth', 4)legend('Vacuum', 'Classical Prediction', 'Quantum Prediction')hold off
Best Answer