"Residue" in General Polynomial Fit Function

Do any of you statistics wonks understand how LabVIEW calculates the "residue" output in the "General Polynomial Fit" function?  How does it relate to the R^2 value on an Excel polynomial trendline.
I've been trying to figure this out for hours, but the LV help files don't seem to have the info I am looking for, and I cannot find a good explanation on line.
Thanks,
FB
Solved!
Go to Solution.

I figured it out.  I was looking at the TOTAL error of all elements, rather than the average error.

Similar Messages

  • General Polynomial Fit

    I need to fit a polynomial function and extract the coefficients a0, a1, etc, of my data. But in the General Polynomial Fit i have to especified the order, is there any way to find automatically the polynomial order and then extract the coefficients? Thank you.

    Thinking about this question again, I`m not sure I`ve answered the correct question at all.
    My original method (Scanning different fit orders) will give aou an N-order Polynomial which fits the signal well, but the assumption that your signal is then also an N-order Polynomial is generally false. If you are simply looking for a polynomial which well describes your signal, this is OK.
    If you are dealing with simple clean signals then you MIGHT be able to make assumptions on the signal type based on various fit coefficients, but if you`re trying to understand fundamentals of a real-world complex signal based on fit-algorithm errors, I would be, in addition to the other respondants, very cautious. I`m not a very good mathmatecian (I love that the fit algorith
    ms simply ), so I can`t begin to give a hint as to do this kind of analysis.
    Shane.
    Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)

  • Different general polynomial fit results

    Hello,
    I've encountered a strange problem using the general polynomial fit: It seems that the outcome of this vi is computer dependent...
    I'm using labview 8.2.1, and tried to use the vi to get a polynomial fit (with an order between 12 and 20) on about 450 datapoints, which seemed to work fine... until I shared my vi with another person, where different results for the polynomial coefficients were obtained with the same datapoints (and the same parameter settings). I noticed that the differences get bigger when the requested order increases.
     has anybody encountered a similar problem?
    greetings,
    Hans
    Attachments:
    get_polyline.vi ‏37 KB

    Well, taking a 20th order polynomial does not make a lot of sense anyway. What are you trying to achieve? There are probably better ways to do whatever you want to do here. You are dealing with extreme intermediary values (e.g. 1500^20=3.32e+63) so a slight reordering in operation could change the outcome.
    Can you explain the differences between the computers? Is the other a different OS (e.g. mac vs windows)? Just curious.
    LabVIEW Champion . Do more with less code and in less time .

  • How to use General Polynomial Fit

    Hey,
    Very new to LabVIEW (mostly use Matlab) and I'm trying to use the General Polynomial Fit VI and I have found the built-in help for LabVIEW very lacking and the examples not much better. The help says that, among other things, the inputs are the x and y data points. I have my data in 1D arrays of double, but this is apparently the wrong format for the VI it states that the VI needs it in double. This would imply that it only takes one data point at at time? Do you have to build it up one point at a time in a loop?
    Thanks in advance for any help,
    dnorman

    Oops, nevermind. Accidentally selected the point by point variation...

  • Using General Polynomial Fit VI with waveform graph

    Hello gurus ,
    I would like to ask how to use General Polynomial Fit VI with waveform graph not GraphXY .
    Waveform graph is giving me an array of values not X , Y i think , what should i do ?
    Thanks in advance
    Solved!
    Go to Solution.

    Hi Omar,
    i changed the shipped Labview Example to use the General Polynomial Fit VI with a waveform graph.
    But why don't you want to use a X-Y-Graph?
    Regards
    DianaS
    Attachments:
    test.vi ‏37 KB

  • Fitting Package (Fit Function) - Please help!

    Hey I'm a noob and I want someone to explain or give me links or just any info regarding:
    Fitting Package (Fit Function) - If anyone knows anything about thise please tell me!
    Thanks in advance!

    Hello,
    I am not sure what Fitting Package you are referring to.  In general, if you are looking for resources to study curve fitting (which I presume is the functionality underlying the Fitting Package you mention), you may want to look at the following site:
    http://mathworld.wolfram.com/search/index.cgi?num=&q=curve+fitting
    Google is bound to return some useful results by searching relevant keywords as well!
    I hope this helps and best of luck!
    Best Regards,
    JLS
    Best,
    JLS
    Sixclear

  • Chebychev Polynomial fitting results show multi lines

    I am using "nonliear curve fit.vi" with defined Chebychev Polynomial  function to fit XY data.  Strangely, if I enlarge the upturn part, I clearly see the fitting results show multi-lines (2-4) . Please the the attached snapshot.
    weitong
    LV2013
    Attachments:
    chebychev Ploynomial fit.PNG ‏48 KB
    chebychev Ploynomial fit-whole.PNG ‏19 KB

    Thanks.
     I found the reason: the data X values are not mononicaly, i. e.  there are local oscillations at some region.
    After sorting the raw data, the fitting results show single line. 
    Is the sorting of X values necessary before Chebychev Polynomial fitting?

  • 2-dimensional polynomial fit

    I want to do a 2-dimensional polynomial fit. How can I do this is LabVIEW or LabVIEW/IMAQ ?
    Marc

    I am not sure what kind of polynomial fit you want to do. LabVIEW offers a generalized least squares VIs for calculating the surface that minimizes the distance to all the data points. Can you explain what you want to do better?
    Jeremy

  • Using the "fit" function with "mFct" ?

    having a problem with declaring a function and using it in a nonlinear least squares fit:
    function Fit5(a,x,y)
    rslt5 = a[1]*(2.0*besselj(sqrt(.....;
    return rslt5;
    end function;
    [a, res1, q1, qVar1] = fit(g, Top_data, fit5, guess,,,iterMax,w,rho );
    getting the following error message:
    is not a valid signature for the function"fit"

    having a problem with declaring a function and using it in a nonlinear least squares fit:
    function Fit5(a,x,y)
    rslt5 = a[1]*(2.0*besselj(sqrt(.....;
    return rslt5;
    end function;
    [a, res1, q1, qVar1] = fit(g, Top_data, fit5, guess,,,iterMax,w,rho );
    getting the following error message:
    is not a valid signature for the function"fit"

  • Polynomial fitting for scatter plot

    Hi all, 
    I was wondering if there is any way to generate a polynomial fit to a scatter plot just like in excel. The data I am trying to fit has several y values for each x value. 
    Thanks
    Krish
    Solved!
    Go to Solution.

    Well, my "solution" above is a bit misleading, because the polynomial fit of course does NOT depend on the x ordering. If the x-values are scranbled as in your case, a maybe better solution would be to simply create a linear x-ramp over the data range and use polynomial evaluation to calculate a smooth best fit line. This has also the advantage tha a smooth curve is generated even if the data points are sometimes far apart.
    Here is one possible modification to show the technique.
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    Scatterplot_fitting_MODCA2.vi ‏13 KB

  • Fit functions with optionally fixed parameters?

    How can I fit functions ranging from a basic linear fit to any
    user-defined function to a set of x-y data with the option of keeping
    single fit parameters fixed (e.g. a known slope in a linear fit)? One
    possibility would be creating an according formula for the
    Levenberg-Marquard-algorithm each time a parameter is set to be fixed
    but that seems to be a bit inconvenient. Is there a simple approach to
    this problem, I guess I'm not the first to try it? Thanks a lot,
    Daniel

    dtroendle wrote:
    How can I fit functions ranging from a basic linear fit to any user-defined function to a set of x-y data with the option of keeping single fit parameters fixed (e.g. a known slope in a linear fit)? Is there a simple approach to this problem, I guess I'm not the first to try it?
    Daniel,
    I have modified the Lev-Mar routines long ago to allow the runtime selection of which paramters should be fixed and which should be held constant. It is not very difficult to implement. I use it to fit EPR spectra where the model can have up to ~30 parameters, but typically only less than 10 are fit while the rest are kept constant.
    Basically, I added a boolean array as input to Lev-Mar which has the same number of elements as the number of paramters of the model function. For each element, a TRUE means that the corresponding parameter should be fit while a FALSE means that the corresponding parameter should be held fixed at the value of the initial estimate.
    You just need to seperate out the reduced problem for the fitting part, but carry all parameters along for the model calculation.
    It works great!
    I am currently traveling in Japan and don't have access to my VIs. Please contact me next week by private e-mail (You can find my e-mail address on the FP of some of my examples posted here, e.g. HERE.
    LabVIEW Champion . Do more with less code and in less time .

  • I need a curve fitting algorithim for polynomial fits, very compact for Fieldpoint implementation (can't use prebuilt VIs).

    I can't use the prebuilt VIs because the libraries take up too much memory on my FP-2000s.  Anyone built up a polynomial fit VI that doesn't include the LV libraries or dlls? 
    Thanks,
    Bill
    Solved!
    Go to Solution.

    Hey Bill,
    That puts you to about 21-22Mb MAX. Doesn't it fit?
    It seems like you may want to look into a controller with larger memory, such as the 2010/2015 or the newer compact FieldPoint controllers.
    Aashish M
    Applications Engineer
    National Instruments
    http://www.ni.com/support/

  • Curve fitting function doesnt work

    Hi all,
    I am trying to do curve fitting, of a graphic. but curve fitting function doesnt work. i dont get any output from curve fitting.
    what would u suggest me to do.
    Thanks
    Solved!
    Go to Solution.
    Attachments:
    graph.jpg ‏642 KB
    code.jpg ‏628 KB

    You have been asked to post the code. We cannot troubleshoot pictures.
    Are the X and Y arrays the same lenght? Is any value NaN? What does the error output tell you?
    (Also note that in this case, it would be convenient if we don't need to wire X. have a look at this idea!)
    This discussion is useless until you attach an actual VI and some data, so please do.
    LabVIEW Champion . Do more with less code and in less time .

  • Power fit function is not fitting correctly to sub-array controlled by graph cursors?

    I am using two cursors on an XY graph to select a subset of the graphed data to fit a power function to. I noticed that the first selection cursor (left-most on the graph) seems to have more control of the amplitude and power of the power fit while the second cursor only seems to limit the "range" of data selected (i.e. does not have much influence over the fit, even though it should).  When comparing the exact same data in excel using a power fit, the excel fits a completely different line.
    Any help would be much appreciated. (please disregard the local variables in my code, only been at this 3 months) I have attached the VI as well.
    Excel fit:
    Attachments:
    Hg Cp.vi ‏83 KB

    Two suggestions.  Change the default parameter bounds.  Specifically, the offset upper and lower limit are both 0, forcing this parameter to be 0.  Change the limits to be Inf for upper limit and -Inf for lower limit.  Also, tighten the tolerance of the fit to be 1E-6 or so.
    -Jim

  • Seeking general knowledge of functional areas(FI, CO HR, SD, MM, CRM)

    Hello Experts,
    I do come across this phrase in my job searches:
    "knowledge in at least 1-2 functional areas. (FI, CO HR, SD, MM, CRM)"
    Can you help or direct me to get a general overview of these functional areas?
    Thanks.

    http://help.sap.com/saphelp_nw04/helpdata/en/37/5fb13cd0500255e10000000a114084/frameset.htm
    they basically expect you to know the tables for these functional areas and the extractors & reports which are available with standard business content...
    assign points if it helps

Maybe you are looking for

  • How to make an unformatted sapscript form

    At the bottom of [this page|http://help.sap.com/saphelp_45b/helpdata/en/34/60b30cae724effe10000009b38f91f/content.htm] it says: "If you want to pass on the information to be printed to one printer only, and this printer then takes care of editing and

  • Is there a way to lock an application?

    Not sure I'm in the right place but here goes. As the title says really - I've got to take my iMac to have a repair done and they want to keep it for a couple of days. I'd like to leave it with them so they cannot open Mail as it as various financial

  • Ipod touch won't sync with itunes, only iphoto after snow leopard update upgrade

    Have just put snow leopard onto my mac book 4.1. Can't get my ipod touch 5.1.1 to sync with itunes. It syncs with iphoto every time, but no device comes up in itunes or in finder. I have the latest software updates on both mac & touch. Any ideas?

  • How to add datafile to standby database

    Hi, We have standby database on another site and we are using manual recovery. How to add datafile to standby database after datafile is added to primary database. We are on Oracle 9i R2. Please help. Thanks in advance

  • PSE 11.   Seemed to have lost content. No icons on bottom bar for frames, etc

    Unable to locate icons for content.  Missing icons on bottom bar for adjustment, effects, textures, frames.  Could  not find content under windows tab. Can i reload the program