Author |
Topic |
|
dadude1105
Germany
1 Posts |
Posted - 05/28/2014 : 07:07:17 AM
|
Hello, I need to plot an integral from T to H=const on the y-axis and T on the x-axis. So the integral is regulated by T. How can I do this?
The next step would then be to divide the Integrale by a function regulatet by T. So I need to plot this against 1/T
|
|
lkb0221
China
497 Posts |
Posted - 05/29/2014 : 10:12:24 AM
|
Hi,
Please try the following LT script:
// Script Start range rT = col(A); // assume col(A) contains the T values range rResult = col(B); // This is where to put the result double A = 10; // This is the A value, which is const //Define f(x) function double TestEq(double x) { return 1 + 2 * x + 3 * x^2; } // Calculate the result column for (int ii = 1; ii <= rT.GetSize(); ii++) { double currentT = rT[ii]; rResult[ii] = Integral(TestEq, currentT, A); // Calculate the integral of f(H) rResult[ii] = rResult[ii] / TestEq(currentT); // Devided by f(T) }
// Plot them plotxy iy:=(rT,rResult);
// Script End |
Edited by - lkb0221 on 05/29/2014 10:16:22 AM |
|
|
Hideo Fujii
USA
1582 Posts |
Posted - 05/29/2014 : 12:01:21 PM
|
Hi,
If you like a non-script way, you can simply use "Analysis: Math: Integrate" menu (as Integral[T:A]f(x)dx = -Integral[A:T]f(x)dx), combined with the Set Column Values tool. See the sample screen. Here, col(B) is your function values (e.g., sqrt(x) here), col(C) is the integration result from Analysis menu. col(D) is the result of the Set Column Values tool to calculate (-1)*col(C)/col(B). Now you can simply plot col(C) (or col(D)) vs. A(X). Does it work for you?
--Hideo Fujii OriginLab |
|
|
|
Topic |
|
|
|