02-14-2015 10:21 PM
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.
02-15-2015 09:04 AM
02-15-2015 10:08 AM - edited 02-15-2015 10:09 AM
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.)
02-15-2015 10:58 AM - edited 02-15-2015 10:59 AM
@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.