LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can I solve two quadratic equations in two variables in Labview?

I have two equations:

1) (x-a)^2+(y-b)^2=(c*r)^2

2)A1*x^2+2*A2*x*y+A3*y^2+2*B1*x+2*B2*y+C=0

The x and y are unknown.

All the other parameters are known but will be updated with the running of my LabVIEW main controller.

 

Can I solve these two equations in LabVIEW? Which function I should use? Thanks for your kind help.

 

I have one case to verify the solution.

For example:

a=-4.8516; b=-0.3407; c=0.7409; A1=-0.2672; A2=0.4344; A3=0.1886; B1=-0.71; B2=-12.2278; r=25.

One real solution is x=-14.7091 and y=15.3405.

I got this solution in Matlab using the solve function. But I do not know how to do this in LabVIEW. Please help me.

 

Many many thanks.

 

0 Kudos
Message 1 of 2
(1,303 Views)

Rewrite your equations in standard form.

Start with the general solution to a quadratic.

Write code the implements that solution; using the functions present in the general solution.

 

Note: When implementing the general solution (in its usual form) on a computing device, it will give inaccurate results in the special case where b >> a*c.  If you wish to handle that case (probably not a requirement for this homework assignment), then check for that condition, and if true, apply an alternate form of the general solution which doesn't contain b^2 - 4*a*c.

 

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 2 of 2
(1,257 Views)