07-07-2010 07:48 AM
I want to solve an equation shown in below by the Newton Raphson zero finder vi:
z-a*b*c*exp(-z/a),
a, b, and c are variables
I can build equation with constant a,b,c, but how can I build this one?
Many thanks!
Solved! Go to Solution.
07-07-2010 08:03 AM
LabVIEW has several types of solvers. Use the search function in the BD function palette.
Your equation does not make much sense. The parameter "a" appears in two places but "b" and "c" only appear as a product. Unless you have other constraints not shown, you cannot solve for "b" separately from "c".
Lynn
07-07-2010 08:18 AM
Sorry, my explaination might be incorrect.
z is the unknow. a, b and c are given by other calculations.
Is this make my question more clear?
Thanks
07-07-2010 09:03 AM
Use the number to string functions in the string palette along with the concatenate string primitive to create a formula with your values of a, b, and c. Read the detailed help carefully for information about the limitations on variable names. "z" is the only variable in your formula for the zero finder. Example is in LV2009.
Lynn
07-07-2010 09:29 AM
Thanks!
I tried the Concatenate Strings Function yesterday, it just doesn't work. May be some minor mistakes.
07-07-2010 12:06 PM
A couple of points I usually feel compelled to make when I see the use of the NR method.
1) Not an issue in a simple case like this, but the NR routine is typically a poor choice when you have a 1D problem and you calculate the derivative numerically.
2) If I am going to hardwire the formula like the previous example, then I will just use a VI instead of a formula. I only use formulas when I want to be able to make changes on-the-fly. I am just a bit dubious of the formula parsing VIs in general.
3) There is a VI called Substitute Variables which will take a set of rules and substitute numbers for parameters in your formula. Here is a quick example of its use. Here the names and number of parameters is fixed by the cluster itself. If I need full flexibility I use a table to hold the parameters and their values, but I do not want to muddy the waters here. You can just choose your favorite UI and convert (if necessary) to the proper cluster for the substitution rules.
09-20-2013 11:07 PM
Hi, How I can create a dynamic subVI Variables and Modbus OPC?
09-20-2013 11:34 PM
This message thread is over 3 years old and has nothing to do with the question you are asking.
Start a new message thread. And be sure to add some details to the quesiton. I have no idea what you mean by "dynamic subVI variables". And how does it related to OPC and Modbus?