LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

integfration function

Hi every one,

 

Is there any way to get the definite integration of a function? I need to do some calculations in my code which one of these is like "Integration of EXP(-x^2)dx from x=-inf to x=+inf". Can anyone please help me?

 

Thanks

0 Kudos
Message 1 of 5
(2,547 Views)

Hi Soran,

 

running a loop from -INF to +INF with a small dx can take quite a long time. 🙂

 

Hint: You should rather use MATLAB or MATHEMATICA for such equations. Or paper and pencil…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 5
(2,523 Views)

LabVIEW does not do symbolic math. For questions like this, ask wolfram alpha, it even understands your question as written.

 

 

 

The answer is sqrt(pi), of course.

Message 3 of 5
(2,516 Views)

 

Thank you guys for your reply.

 

Actually I do not think I can use wolfram (or paper and pencil!) to do this. The integration I mentioned above was just an example of what I should do. In fact, it will be something like this: "EXP(-x^2)/(a^2+(b-x)^2) x=-inf to x=+inf" in which a and b are two constants (relative to x) related to pressure and temperature (which change continuously). So some parts of my code read the temperature and pressure and then should substitute their values inside this formula and finally get the tesult of the integral.

 

Thanks,

Soran

0 Kudos
Message 4 of 5
(2,486 Views)

You simply use wolfram alpha again (or any other symbolic math tool) and it will give you the resulting formula in terms of a and b (need to upgrade to pro, though). Then program it in LabVIEW.

0 Kudos
Message 5 of 5
(2,482 Views)