cancel
Showing results for
Did you mean:

## Plot a function by function equation and extrapolate

Hey,

I did linear regression and got an equation like y=a*x+b. Now i want to extrapolate that function, but i dont have values for that region i want extrapolate to. Is it possible to plot the function by its equation and extrapolate the range?

In attach is an image of my values (green) and the regression curve (light red). I want my curve to intersect zero.

I tried already to add the point (0/0.37) to the regression chanels. But it didnt work. 0.37 is b in my case.

thx for help

Message 1 of 4
(4,772 Views)

## Re: Plot a function by function equation and extrapolate

Hi LePot,

You can create a channel from a linear "y = mx + b" formula with the "Generate Numeric Channel" dialog in the "Channel Functions" palette of the ANALYSIS panel-- you just need to tell it the starting and ending X values and the slope "m".

National Instruments

Message 2 of 4
(4,756 Views)

## Re: Plot a function by function equation and extrapolate

at first thx for ur help.

I tried it but it didnt work out. Of course I can type in the starting and end x values but where to type in the slope and what about the b? I did an image of the "Generate Numeric Channel" for u to check out if its the right one u talked about.

LePot

Message 3 of 4
(4,734 Views)

## Re: Plot a function by function equation and extrapolate

Hi LePot,

Yes, that's the function I mentioned.  The start value and end values already have the m and b parameters built into them.  Assuming you want the x range to start at x1 and continue to x2, these would be the y1 and y2 values you would type into the dialog:

y = m(x) + b
y1 = m(x1) + b
y2 = m(x2) + b

Typically you would do this in a VBScript using the ChnLinGen() command.  There is also a ChnLinGenImp() command that takes the y1 and m parameters.