PlotFunc-Parameter-in-Wks
Origin can plot functions. It also can plot functions with parameters defined in a worksheet. The function graph can be updated automatically as the parameters in the worksheet change.
This tutorial will show you how to:
Let us use this function as an example: y=p0+p1*x+p2*x^2
y=p0+p1*x+p2*x^2
The script used in the Before Formula Scripts edit box of the Set Values dialog box is:
p0=col(1)[1]; //Specify Column A for p0. p1=col(2)[1]; //Specify Column B for p1. p2=col(3)[1]; //Specify Column C for p2.
The function in the F1(x) edit box of the Plot Details dialog box is as follows:
p0+p1*x+p2*x^2