Plotting dot to denote a a specific point in a curve

1 Ansicht (letzte 30 Tage)
Abdoulaye Diallo
Abdoulaye Diallo am 1 Feb. 2015
Kommentiert: Geoff Hayes am 1 Feb. 2015
Hello,
I was wondering how to plot a dot specifying a point along a curve that I'm plotting.
My code is the following:
x=-20:0.01:20;
y=x.^5-4*x.^4+3*x.^2+8;
y0=ones(1,length(x))*15;
hold on;
zoom xon; zoom yon;
zoom on;
plot(x,y);
plot(x,y0, '--g', 'LineWidth',2),axis([-2 4,-80, 60]);
I want to plot on the intersection between the two plots. I know where it is located (using the zoom function allows me to easily find it) but I don't know the specific syntax required to put a dot there.
Any feedback would be greatly appreciated.
  1 Kommentar
Geoff Hayes
Geoff Hayes am 1 Feb. 2015
Just use plot as you have done before using scalar inputs for the x and y coordinates rather than the vectors used previously.

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Visual Exploration finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by