08-12-2010 02:23 PM
Awesome. Good to learn those ways of data transfer. I had just used a global variable before.
Great help and thanks for your time
09-07-2012 09:47 AM
hello,
I have a probleme with the Levenberg-Marquardt fitting VI.
I use some datas wich come from a excel file and wich is composed of two parts ( part X, part Y).
But in the X part, the datas have not a constant scale (for example, 0,1 0,2 0,5 1 2 5 ...) and to use Levenberg-Marquardt fitting VI,
i need to a constant scale, so how could i make that?
I had an idea, it was to draw a express XY graph thanks to the excel datas, to determine some points with a constant scale (by a ponctual Y value.VI)
but any VI can be use with express XY graph, because there is a conversion problem (express XY graph is an array of two clusters) and i didnt´t find a tool to the conversion.
so could you advice me another solution
02-10-2013 05:47 AM
Great tip about the Lev-Mar data input!
Question:
Why do you wire the Lev-Mar data terminal and send via Call by Reference???
By wiring the Lev-Mar data terminal won't this do the same thing? Is there a conflict here?
The clusters are the same however the parameters are different. How does Lev-Mar use this custom data cluster??
02-10-2013 12:09 PM
@battler. wrote:
Why do you wire the Lev-Mar data terminal and send via Call by Reference???
By wiring the Lev-Mar data terminal won't this do the same thing? Is there a conflict here?
Sorry, I don't understand the question.
The model reference tell the nonlinear fit VI which model to use, and the data in the data terminal gives additional information to the model (In addition to the parameters and possibly the X-array received via the regular terminals).
I do a call by reference node on the main VI to calculate the model using the starting paramters. This is useful to see if the parameter guesses are reasonable. In its place, you could just call the model VI. My above method is more scaleable and easier to modify, for example of you would later point the model to a different VI, no other code changes would be needed.
It is also useful e.g. if you want to have a choice between different models. You could then use several static VI references and select which one to use at runtime.
02-10-2013 12:34 PM
Also note that in LabVIEW 2012, you could use conditional indexing tunnels to simplify the FOR loop in the lower left.
In addition, the two decorations are covering up the controls so nothing can be operated. The decorations need to be moved to the back or deleted.
02-10-2013 02:38 PM
Ah now I understand, you used Call by Reference to first set the starting parameters.. Thanks.
02-10-2013 05:43 PM
I simply call the fit with max iterations set to zero and it returns the curve corresponding to the starting parameters.
02-10-2013 07:28 PM
@battler. wrote:
Ah now I understand, you used Call by Reference to first set the starting parameters.. Thanks.
The call does not "set" the parameters, it just shows you if they are reasonable. 😄