In this example datatable, response is defined by fomula: response = time*time
I would like to calculate "area under the curve" (AUC) by integration using the fomula defined in the response column and the time range defined in the :time column, then populate the result in a new column in the datatable (by "populate" I mean all rows have the value of the calculated AUC).
I know I can use the following script to calculate the AUC, and the result of area is 41333.
resp = Expr (time * time);
area = Integrate (resp, time, 10, 50);
show (area);
However, when I tried to populate the AUC result (all rows have the value of 41333) in the :Integrate column by using formula:
Integrate( :response, :time, Col Maximum( :time ), Col Minimum( :time ) )
instead of populating the result 41333 , the formula calculated the result based on the defined value of : time in each row.
What is the correct way to write the formula so that the :Integrate column is populated with the result 41333?
I know I could use JSL to create a new datatable and then join the result but would prefer to do this within the same datatable.
Thanks!