Plotting dot to denote a a specific point in a curve

조회 수: 1 (최근 30일)
Abdoulaye Diallo
Abdoulaye Diallo 2015년 2월 1일
댓글: Geoff Hayes 2015년 2월 1일
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
Geoff Hayes
Geoff Hayes 2015년 2월 1일
Just use plot as you have done before using scalar inputs for the x and y coordinates rather than the vectors used previously.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Visual Exploration에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by