ni.com is currently undergoing scheduled maintenance.
Some services may be unavailable at this time. Please contact us for help or try again later.
07-07-2023 12:13 PM
I want to include an exponential function in my code, but the exponential node only seems to include Logarithm Base 10. Why is there such a limited choice of math functions in G Web? Is there any way around? Thank you for your help.
Solved! Go to Solution.
07-07-2023 12:53 PM
Never mind. I'm building my exponential with complex trigonometric functions.
07-12-2023 11:32 AM
As a future reference, another idea could be to use the JavaScript Library Interface to call existing JavaScript functions that might be useful. The JavaScript language has several Math functions that you can call with the JSLI.
The following is an example of using the JSLI to create a Node named Natural Log that will call the JavaScript global Math.log with one numeric argument and a numeric return value:
MilanR_0-1689179344874.png
And then I can use the Natural Log node on my diagram:
MilanR_1-1689179375172.png
MilanR_2-1689179387849.png
07-20-2023 09:01 PM
Alternatively, you can convert ln to log(10). We used it and it worked fine.
ln(x) = log(x)/log(e)
ln x.png