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: 

introduction to curve fitting tutorial - non-linear curve fitting example

Solved!
Go to solution

As indicated in my first question I asked yesterday I am new to labview and I am still working through the curve fitting tutorial, but am now up to the non-linear section (although I have skipped the polynomial stuff for the moment).  So my question now has to do the with the vi shown in Figure 14 of the Introduction to Curve Fitting tutorial. 

 

My problem this time has to the do with creating the Gaussian graph for the non-linear data and fit.  It looks like it gets its data from a cluster of some sort which is itself sourced from to separate build clusters.  The specific problem is that I can't seem to find the appropriate cluster function that will result in producing a graph.  I had a try at using a variety of different cluster functions and also having a look at trying to use an array function and none of them work.  Now an assumption I have made also is that the graph is of the form XY (and not a waveform graph).

 

Note I am aware that part of the problem could be my lack of experience in coding using labview, thus I have attached the vi I have been working on.

 

I am using labview 8.6.

 

Thanks again for any help.

 

0 Kudos
Message 1 of 3
(6,478 Views)
Solution
Accepted by topic author scottum

Don't use the function you are using.  Use the bundle cluster function on each plort, then build array out of those 2 clusters.

 For the subVI, right click the input that is causing the broken arrow and choose create constant.

 Any time you have a problem trying to find the right data type to input into a subVI.  Do a right click, create constant.  Now you'll have a default constant of the correct datatype that you can modify as needed.

Message Edited by Ravens Fan on 01-20-2009 12:12 AM
Message 2 of 3
(6,476 Views)

Thanks Ravens Fan.  I have made the changes as you suggested and it does allow the vi to run and produce the data although it doesn't do the fit, which has probably something to do with the lack of a non-linear function (ie this is the f(x,a)).  However given the slight differences in the look of the vi in labview and in the tutorial there could be a reson for this. 

 

Aside from that, thank you for the help it is taught me some more about what to watch for in labview - especially when it comes to getting the data into a form that can be graphed.

0 Kudos
Message 3 of 3
(6,467 Views)