From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Solving linear equation

Is any formula to solve the below equation in LabVIEW

3*x^1/2+2*x+7*x^3/2+2*x^2+5*x^5/2=2

Thanks in advance

0 Kudos
Message 1 of 10
(4,381 Views)

If you have a formula, it does not depend on the programming language. Nothing to do with LabVIEW.

 

Is x guaranteed to be positive?

 

If you don't have a formula, you could e.g. use e.g.  Newton-Raphson with a few iterations starting with a reasonable guess. A nice programming exercise. 😄

0 Kudos
Message 2 of 10
(4,372 Views)

Have you tried using the formula node?

0 Kudos
Message 3 of 10
(4,319 Views)

@Fewoiz wrote:

Have you tried using the formula node?


It is "=2", not "+2" and he wants to solve for x.

0 Kudos
Message 4 of 10
(4,313 Views)

Yeah I know,  I wasn't sure if I was being too simple but assumed that he would know to rewrite the equation so that 2( as a variable) is the input and X is the output. 

 

X= 0.222647?

0 Kudos
Message 5 of 10
(4,301 Views)

Thanks to everyone for your valuable inputs.

Atlast i solved the equation by doing some modifications in the vi which i downloaded from forum and am attaching the same vi here

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

Brabin777 wrote:

Atlast i solved the equation by doing some modifications in the vi which i downloaded from forum and am attaching the same vi here


When quoting somethings from the forum, please include a link! Do you have a link?

 

Why is the VI so messy?

 

0 Kudos
Message 7 of 10
(4,248 Views)

@Brabin777 wrote:

Thanks to everyone for your valuable inputs.

Atlast i solved the equation by doing some modifications in the vi which i downloaded from forum and am attaching the same vi here


Don't forget that there will be quite a few more roots, some complex. In this case, there is one real root and you can find it as follows using this VI. (Of course you need to make certain assumptions about x). In the more general case, use this VI to sort out the real roots.

 

FindRoot.png

 

 

Message 8 of 10
(4,245 Views)

Thanks

As mentioned earlier here is the link where i got vi to solve the equation https://forums.ni.com/t5/LabVIEW/Solving-Math-Expression-using-Labview/td-p/2113376 

0 Kudos
Message 9 of 10
(4,234 Views)

Hi,

The „Solve Linear Equations VI“  works differently in PC and in Realtime. When I run the attached VI in the PC (without compilation) it gives TRUE. The same VI when I run in Real time Project (cRIO – with compilation) it gives FALSE.

I have gone through the VIs and I found different function for different target (Default & RT Target). Why its different for various target? The result without compilation (Default) is correct value. How I can use that?

Whether the DLL format is not supported by Realtime?

 

Thanks & Regards,

Shree

0 Kudos
Message 10 of 10
(3,793 Views)