Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

03-21-2014 11:24 AM

Options

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

Hi

Does anyone know how to generate an equation from an XY graph. I had a set of data, generated an interpolated plot of the data set, and my curve/pattern is logarithmic. Though I would like to get the equation of the curve, the info i am really after are the Slope and Bias of the equation. This is the format I think the equation would be in: y = (Slope)*ln(x) + Bias. Any assistance is greatly appreciated. Thanks in advance.

Solved! Go to Solution.

Highlighted
Options

03-24-2014 11:41 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

Hi AR_Odusanya,

As far as a simple XY graph goes I'm not aware of a way to generate an equation based off the data since it is just a simple indicator. Are you able to post your code?

David H.

National Instruments

National Instruments

Solution

Accepted by aro1

03-24-2014 12:11 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

Trying to run a log fit to Y = m ln(x) + c is no different to running a linear fit on Y = m x' + c, where x' = ln(x).

Still, you can do this two ways:

Logarithm fit for a sequence of X and Y will return amplitude and scale.

Consider Y = a ln(bx). We know from simple logarithms that ln(bx) can be expanded to ln(b)+ln(x)

So Y = a ( ln(b) + ln(x) )

Rearranging, Y = a ln(x) + a ln(b) (equivalent to your slope and bias expression)

where a is equal to 'amplitude' and b is equal to 'scale'.

Linear fit for a sequence of X = ln(x) will return slope and intercept.

Consider Y = m ln(x) + c = m X + c

The slope output is m, the intercept is c.

---

CLA

CLA