Hi,

doug gave you the answer. With a finite amount of points the only way

to get a smooth curve is with interpolation.

You can use the function interp1 to test different kinds of

interpolants. See 'help interp1' to know details.

Example with splines

pp = interp1 (x, y, 'spline', 'pp');

x_ = linspace (min(x), max(x), 100).'; % desired points to plot curve

y_ = ppval (pp, x_);

plot (x_,y_,'-', x, y, 'o')

legend ('curve', 'data', 'location', 'northwest')

On Sat, Dec 15, 2018 at 5:30 PM Montgomery-Smith, Stephen

<

[hidden email]> wrote:

>

> Did you mean x2 = 1:.1:4 ? ________________________________

> From: Help-octave <help-octave-bounces+stephen=

[hidden email]> on behalf of Doug Stewart <

[hidden email]>

> Sent: Saturday, December 15, 2018 10:05:48 AM

> To: linuxnero

> Cc: Help GNU Octave

> Subject: Re: help to make a curve onli with to vectorts

>

>

>

> On Sat, Dec 15, 2018 at 10:58 AM linuxnero <

[hidden email]> wrote:

>>

>> of course but that graph a straight lines

>> but i want a curve

>>

>>

>>

>

> Try this

> x= [01 2 3 4]

> y= [0 10 15 20]

>

> plot(x,y)

> hold on

> p=polyfit(x,y,3)

> x2=0:.1:5;

> y1=polyval(p,x2)

> plot(x2,y1)

>

> --

> DAS

>

>