# Thread: Smooth graph matlab

1. ## Smooth graph matlab

Hi i have a graph (please see attatched).

But i want them to be smooth curves.

My teacher has told me to reduce bin sizes.

How do i do this?

2. Originally Posted by adam_leeds
Hi i have a graph (please see attatched).

But i want them to be smooth curves.

My teacher has told me to reduce bin sizes.

How do i do this?

Sort the data in a data set (call the data: x) put y=(1:length(x))/length(x) then plot(x,y)

CB

3. Originally Posted by CaptainBlack
Sort the data in a data set (call the data: x) put y=(1:length(x))/length(x) then plot(x,y)

CB
Bit confused.

I already have x as a set of values. And y as a set of values.

4. In fact that's what i've already done.

PR = sort(x);
x=[1:1:366];
a=x/366;
plot(PR,a)

and it comes out like that

5. Originally Posted by adam_leeds
In fact that's what i've already done.

PR = sort(x);
x=[1:1:366];
a=x/366;
plot(PR,a)

and it comes out like that
So why are you talking about bin sizes, there is no binning involved?

CB