LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Linear Curve Fitting



Maryam hosseini wrote:
I was wondering to see how I can wire f(X) to the fitting function.
Here's a quick draft. See if it makes sense. 🙂 (LabVIEW 8.5)
0 Kudos
Message 31 of 42
(1,512 Views)

what you have done makes sense, 

but when I want to do exactly what you have done still I have problem,  I am not able to wire the VI static refrence to the fitting funtion. Smiley Sad

0 Kudos
Message 32 of 42
(1,502 Views)
Did you make the reference "strictly typed"? (right-click...)
0 Kudos
Message 33 of 42
(1,500 Views)

Yes I did, still does not work,

I have attached the code.

Download All
0 Kudos
Message 34 of 42
(1,486 Views)

Try to use the attached VI instead. It eventually worked fine on my computer. Right-click the reference and browse to this VI.

KostasB

NI UK

 

0 Kudos
Message 35 of 42
(1,481 Views)

Maryam hosseini wrote: Yes I did, still does not work,
You did not hook up any of the connectors. Your model VI has no connectors and is thus an incorrect type for the fitting VI. You need to start with the template and then just insert your specific code and hook it up to the existing terminals.
 
The model VI needs the exact connector pattern as defined in the template and described in the help. Maybe you missed it, but I already made you a working version. Look in the zip file of the above post  🙂
0 Kudos
Message 36 of 42
(1,472 Views)
A good introduction on connectors would be the LabVIEW help:
 
Have a look at the topics in the section "Creating SubVIs" at http://zone.ni.com/reference/en-XX/help/371361D-01/TOC15.htm
 
 
 
0 Kudos
Message 37 of 42
(1,468 Views)
A good introduction on connectors would be the LabVIEW help:
 
Have a look at the&nbsp;topics in the section "Creating SubVIs" at <a href="http://zone.ni.com/reference/en-XX/help/371361D-01/TOC15.htm" target="_blank">http://zone.ni.com/reference/en-XX/help/371361D-01/TOC15.htm</a>
&nbsp;
&nbsp;
&nbsp;
0 Kudos
Message 38 of 42
(1,457 Views)

I am trying to run this VI, but It gives me error, everything sounds correct I think, Could you have a look at it?

 

0 Kudos
Message 39 of 42
(1,446 Views)

You are creating a race condition because you try to fit before you calculate the estimated initial parameters. The calculation of the initial extimates MUST be done before you fit. Right now, it uses an empty array for the estimates, because that's how the feedback node is initialized.

A good way to see this is to run your code in execution highlighting mode. Try it!

Here's how to do it. 🙂

0 Kudos
Message 40 of 42
(1,441 Views)