Jump to content
  • Similar Content

    • By AnnihilationSpectrum
      Hi, I'm new in Labview.  I work as an intern. I have a formula for fitting a spectrum. The left side of the spectrum is higher than the right side. There's a background on the left side.I need to lower the level of the left side to the right by applying this formula. It should be a Gaussian curve.  I need help. Who can help me?


    • By Porter
      LV-muParser provides a simple LabVIEW API for muParser fast math expression parser.
      A modified version of muParser v2.2.5 is included. It will be installed to your "<LabVIEW>\resource" directory. I have added support for the "!" (not) operator as well as added ":" as a valid character for variable names.
      You will find the muParser API in the functions palette under "Addons > LAVA > muParser"
      muParser: http://beltoforion.de/article.php?a=muparser
      LV-muParser source on github: https://github.com/rfporter/LV-muParser
    • By Manudelavega
      A few years ago I wrote my own equation computing algorithm for my company's flagship software. The user will write equations using variable names and constants (for example a=2*b+3), and those equations run continuously every 100ms.
      The pros
      The user can add Min and Max expressions inside the equation. For example a=Min(b,c)+2. The syntax supports parenthesis. For example a=3*(b+c). The limitations
      You can have several operators but their priority is not respected. For example the result of 1+2*3 will be 9 instead of 7. The user has to write 1+(2*3) or 2*3+1 to get the correct result. You can't put an expression inside a "Power" calculation. For example, you can do a+b^c but you can't do a^(b+c). You would need to create a new variable d=b+c and then do a+d, so now you have 2 equations running in parallel all the time instead of 1. There is no support (even though it wouldn't be hard to add) for sin, cos, tan, modulo, square root... I am now thinking of using a built-in LabVIEW feature (or one the community might have created )  in order not to reinvent the wheel completely. Surely I am not the only person who needs to compute equations.
      I looked at vi.lib\gmath\parser.llb\Eval Formula String.vi and it seems to answer 90% of my needs, it is simple to use, but it doesn't support Min and Max expressions and writing a hybrid system would be complicated.
      What do people use out there?
      If I need to reinvent the wheel, I found interesting resources such as https://en.wikipedia.org/wiki/Shunting-yard_algorithm and https://en.wikipedia.org/wiki/Operator-precedence_parser so I think I can pull it off, but it's going to be very time consuming!
      Cheers 
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.