Skip to main content

How do I include multiple independent variables or column numbers as part of the curve fit definition?

To do this, you need to use the table function. For example, suppose you plotted c0 as X and c1 as Y and wished to use the values in c2 as part of the curve fit definition (possibly as a second independent variable). Anywhere you want to use c2 in the definition, replace it with table(m0, c0, c2). To use the table function, the X column must be sorted and there cannot be any duplicate values.

The table() function performs linear interpolation. When you use table(m0,c0,c2) in a curve fit definition, KaleidaGraph looks at the current value of m0. The values used for m0 are the same as what was used for X when you created the plot. It then goes to the data window and looks in c0 for this value. It will then return the corresponding value from c2 as the result of the formula.

These fits can also be done even if you have duplicate x values:
Create a new column of data, c4 for example, and use Formula Entry to set c4=index()+cy-cy, where cy is your y data column.

If c0 and c2 are x1 and x2, create a plot using c4 as the x axis variable, but in the curve fit definition (suppose you want to fit y=a+b*x1+c*x2) use a+b*table(m0, c4, c0) + c*table(m0, c4, c2).

The resulting plot will look a little strange, but the parameter values are valid because all of the values in c4 are unique.

Scroll to Top
Synergy Software
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.