Hi everyone; I'm trying to write the correct codes of this plot. I wrote this codes but I could not draw the red and green lines.
f=@(x) x.*exp(-x.^2); x=[-4:0.1:4]; plot(x,f(x)); xmin = fminbnd(@(x) f(x),-4,4); xmax = fminbnd(@(x) -f(x),-4,4);
How can I draw the red and green lines? Thank you very much
Best Answer