Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
How to put a dot to indicate an existence of limit in a discontinuous graph

Subject: How to put a dot to indicate an existence of limit in a discontinuous graph

From: Ron

Date: 14 Apr, 2011 18:25:20

Message: 1 of 2

Hey there,

I am writing a tutorial note to teach students some basic calculus. I can draw a graph in matlab to demonstrate a discontinuous graph but I don't know how to put a dot in the graph in order to show the limit exists. Here is the code:


x = [0:0.1:5];
y = 2*x; % first part of curve
x = [x,5]; % Cause a break in the line
y = [y,NaN];
x1 = [5:0.1:10]; % 2nd part of curve
x = [x,x1];
y = [y,x1.^2];
plot(x,y);

As you run the code, you can see the discontinuity at 5. At that point, I want to put a dot to show left limit exist and a circle to show right doesn't exist. Does anyone know how to do it?


Cheers
Ron

Subject: How to put a dot to indicate an existence of limit in a discontinuous graph

From: Florin Neacsu

Date: 14 Apr, 2011 18:44:07

Message: 2 of 2

"Ron " <ronctl@hotmail.com> wrote in message <io7e6g$asu$1@fred.mathworks.com>...
> Hey there,
>
> I am writing a tutorial note to teach students some basic calculus. I can draw a graph in matlab to demonstrate a discontinuous graph but I don't know how to put a dot in the graph in order to show the limit exists. Here is the code:
>
>
> x = [0:0.1:5];
> y = 2*x; % first part of curve
> x = [x,5]; % Cause a break in the line
> y = [y,NaN];
> x1 = [5:0.1:10]; % 2nd part of curve
> x = [x,x1];
> y = [y,x1.^2];
> plot(x,y);
>
> As you run the code, you can see the discontinuity at 5. At that point, I want to put a dot to show left limit exist and a circle to show right doesn't exist. Does anyone know how to do it?
>
>
> Cheers
> Ron

Hi,

You could probably use text.

>doc text

Regards,
Florin

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us