LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Mathscript natural log issue

Hello, I am brand new to LabView and programming itself, so sorry if this question is as stupid as I'm assuming it will be. I am trying to write a VI that uses mathscript to output the percent deviation of Stirling's approximation from the actual value of ln(N!) using a factorial sub VI that I have created. I keep getting an error in the mathscript formula with ln, and I have no clue why. If anyone could help me out with this, that would be much appreciated.

0 Kudos
Message 1 of 4
(4,348 Views)
What it the error?

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 4
(4,313 Views)

I think you need log(x) for the natural logarithm. (See also this table, ln(x) is not a recognized function)

 

(we are also missing your subVI. I am not sure why you even use mathscript for this. Plain LabVIEW primitives would be sufficient.)

0 Kudos
Message 3 of 4
(4,298 Views)

@altenbach wrote:

Plain LabVIEW primitives would be sufficient.


Here's a quick draft showing the output of N! (stock LabVIEW) and the Stirling approximation. No Mathscript needed. I am sure you can easily add the percentage deviation calculation.

 

0 Kudos
Message 4 of 4
(4,283 Views)