Linear fit without professional version. Workarounds anyone?

Hey, I'm trying to do some analysis and need to find the slope of a curve.  The drivers I have are trying to access the linear fit function but I don't have the pro version so I can't use it.  Anyone know of a free workaround VI possibly or any other solution?  
Thanks

Hi acolbourn
The linear fit just implements the least squares algorithm, this is pretty simple. 
You can read how this algorithm works here:
http://en.wikipedia.org/wiki/Least_squares
What parameters does the driver call the function with just X and Y as input, and best fit as output?
Regards, 
Anders Rohde

Similar Messages

  • Linear Fits

    I have some data that should follow a straight line, but there are spikes in
    it. Rather than manually editing the data to remove the spikes, which is
    tedious and time consuming, I wanted a function that would intelligently
    decide which datapoints were bad and zap them.
    Initially I thought this would be trivial; do the fit, calculate residuals
    and zap all data lying further than one standard deviation from the line.
    However, the spikes are sufficiently large that they can skew the linear
    fit, and hence the determination of which points to drop. Doing a threshold
    zap on the raw data isn't adequate since the values of the data aren't
    sufficiently consistent between sets.
    I tried differentiating the residuals- and in another attempt the straight
    line data- reasoning that the differential should be constant everywhere
    other than around the spike, and a simple thresholding would then tell me
    which data to kill. Again no success; the data either side of the spike are
    far from the constant line, the data of the spike itself are not.
    The approach I've settled with is to do the linear fit on all the data, get
    the MSE, zap the first datapoint and get the MSE, replace the first and zap
    the second and so on until I have a table showing the effect of removing
    each individual datapoint on the overall fit quality. I then find the most
    significant datapoint, see if the effect of removing that gives a percentage
    decrease in the MSE better than a user defined threshold, and then repeat
    the process until either there are no more significant gains to be made or a
    limit for the percentage of data that can be dropped is reached. To avoid
    zapping down to two datapoints, I've chosen 50% as the maximum number of
    points to lose and 50% as the increase in fit quality required to justify
    the loss of a data point.
    This works well, but it means that if there are n datapoints, n linear fits
    must be carried out for each data point dropped. Execution time is therefore
    going to increase exponentially with the data size, which always worries me
    slightly.
    One thing I've already thought of is the possibility of zapping more than
    one point per iteration; however the fit changes so much when a single
    outlier is removed that I suspect valid data may be lost this way.
    Does anyone have any other suggestions to zap erroneous data without zapping
    good data? This technique is fine for small datasets, and I guess the
    threshold-based zapping is fine for large datasets, where the loss of a few
    points changes the fit only very little, but if I ever need to do this on
    data in the intermediate region I might have to start playing about again.
    Craig Graham
    Physicist/Labview Programmer
    Lancaster University, UK

    I have a question about your approach:
    Does "ZAP" mean that you are going to completely "delete" the outlier point or to "modify" it? Be advise that if you completely delete an outlier, your resulting data will be shifted to the right from that point, and thus your resulting data will no longer resemble a straight line.
    www.vartortech.com

  • How should I set up my VI so that I can use the linear fit coefficient data analysis program, when my values are coming from while loops within a sequence structure?

    I'm attempting to create a calibration program, using the printer port, and a Vernier Serial Box by modifying a calibration program designed for the serial box.
    There are six calibration points, and to collect them, I have it controlled by while loops so that the numbers are taken when a button is pushed, and this is inside a sequence structure so that I can get the six different points. I feed these numbers into two different arrays (for x and y values) and then try to use the linear coefficient analysis on these points, but the values for the slope and intercepts it returns are not correc
    t.
    If I cut out the array and coefficient analysis, and feed the same numbers in directly without the while loop and sequence structures, it produces the proper values... I don't know why the numbers it is producing are different, and I'd really like to know.
    Thanks,
    Karinne.

    I would use a data manager sub-vi that would be called by each from of the sequence structure that produced a data point. The data manager sub-vi could auto append new items or could place items in a specific entry of an array. Later on when you want to calculate the linear fit, call the sub-vi to return the array of values.
    Stu

  • Bug in coefficien​ts output of General LS Linear Fit LabView 8.5.1?

    Hi
    I compiled my application from LabView 7.1.1 to LabView 8.5.1. This application use the "General LS Linear Fit.vi". I noticed that there differences in the calculation of the coefficients.
    There are attached two files, one comiled in LV7.1.1 and the other with LV 8.5.1, with two different results. Please make sure you open this files with the correct version.
    If I change in "General LS Linear Fit.vi" the link to the lvanlys.dll of the LV7.1.1 version, the calculations are correct.
    Any help would be appreciated, thanks.
    Fil

    Hi André
    I think the results in the 8.5 Version are completely wrong. If the result would deviate a few percent one could say that the new version could be more exact. But not like that.
    Fil
    Attachments:
    calc_71.JPG ‏154 KB
    calc_85.JPG ‏184 KB

  • Linear Fit not run with NaN

    Hi guys.
    I am trying use Linear Fit to made the best fit of temperature acquisition, but during the acquisition i acquire some NaN data.
    I can plot the temperature graph, but i cant plot or receivo soma data from Linear Fit.
    My code is below, in LV2010.
    Can anyone help me?
    Icaro Kossmann
    LabVIEW 8.6 Newbie.
    Brazil
    Solved!
    Go to Solution.
    Attachments:
    novo fit 16-04.vi ‏19 KB

    Follow my VI.
    Icaro Kossmann
    LabVIEW 8.6 Newbie.
    Brazil
    Attachments:
    Linear_fit_Teste,_array_constante_15-04-2014[1].vi ‏16 KB

  • Bug in MSE output of General LS Linear Fit.vi?

    Hi: In the General LS Linear Fit.vi, output MSE. Help for the vi describes the formula as (I attached a picture, but I'm not sure if it will appear in the post), but it looks like something is missing, because if I use the formula to my input values, I get a match only if all input Standard Deviations are 1's. As Standard Deviations increase, this formula gives me smaller MSE, higher MSE if Standard Deviations decrease; but I noticed MSE of the vi doesn't change so much, and every time all input Standard Deviations have the same value (no matter how large or small they are), MSE returns to the same original value.
    According to the formula, MSE is inverse proportional to the square of Standard Deviations, no way to return to original value if they're changed. Is this formula correct or shuld it be different?
    Attachments:
    untitled6.jpg ‏5 KB

    Hi, Karunya:
         I actually rechecked my stuff, and I found that the formula that Mehak_D showed me in
    MSE formula.JPG
    is correct and really works. and the one I found in one of the LV 5 help files were wrong
    untitled6.jpg
    I'm attaching 2 pictures showing the LV5 Help file where I found it, as well as the Index where I clicked to open it. Just let me know if the formula were corrected in the Help file for later LV versions.
         Thank you very much.
    Attachments:
    General LS Linear Fit Theory.jpg ‏96 KB
    Help Index.jpg ‏34 KB

  • Bug sur la fonction "Linear Fit" entre LW 8.0 et LW 2009

    Bonjour,
    nous rencontrons des différences sur le résultat de la fonction LINEAR FIT.vi (avec méthode bisquare)
    Le même programme, un compilé sous LabVIEW 8.0 et l'autre sous LabVIEW 2009, donne des résultats différents. 
    Je ne trouve pas les corrections qui ont pu être apportées sur cette fonction entre les différentes versions de LabVIEW.
    Comment être certain que la fonction donne de bons résultats ? Celle sous LabVIEW 8.0 est-elle correcte ?
    Pour info, le résultat sous Lw 2014 est le même que sous LabVIEW 2009.
    Merci

    Sorry for the delay.
    I added two sreenshots with the same function and the same datas: the first example runs on LW8.0 and the 2nd runs on LW2014.
    We encounter differences on results (slope, interception ... etc)
    Thank you for your help 
    Attachments:
    RegLin_8.0.JPG ‏132 KB
    RegLin_2014.jpg ‏144 KB

  • How to use linear fit

    Anyone here to help me how to use the linear fir vi?
    Is this vi capable of analyzing a line with a negative slope?
    What shold i input in this vi? I tried connecting my x and y arrays in this vi but still outputs nothing. Is there a bug on this vi?
    Is there a way to fit a line in my data points like what excel does?
    Thanks again for helping me numerous times.
    Brein
    Stuck again

    Brein wrote:
    This is my vi. I am using labview 7.0 and vision 7.0. This project is about finding a relationship between concentration of a certain solution and its color value using rgb space. I am already able to plot the relation ship found in sequence structure 3 of 3(assuming the first sequence is 0 of 3). How to put a linear fit in my data points?
    So you need to do a global fit to three datasets (R, G, & B). Since you seem to deal with a greyscale image, it is probably sufficient to fit only a single channel. What function do you use in excel?
    Sorry, I don't have the vision module. Can you strip down your VI as follows:
    create indicators on the three orange arrays in frame #2. (right-click wires, create indicator)
    Run the VI so the indicators contain data.
    Turn the indicators into diagram constants (right-click..change to constants). Wires will be broken, leave them broken!
    Save the VI under a new name and attach it again.
    I am quite busy today, maybe I can look at it tonight if nobody else gives a solution.
    LabVIEW Champion . Do more with less code and in less time .

  • Weighted linear fit

    Hello,
    I'm new in this forum and unfortynately I'm not so confident with LabView.
    Now I'm working with LabView 7.1 and I have a normal linear fit in my program. What I would like to do is change this fitting with a weighted linear fit.
    Searching a bit in the web I found that in the version 8 there is already a VI for this fitting. I guess should be possible with a bit of math to write a subVI, but I have some problem to estimate the weights. is someone can help me?
    And just another question: which of these fitting methods is the best:
    -least square
    -Least Absolute Residual
    -Bisquare
    Thanks

    Hi laser81,
    Thanks for posting your query on the National Instruments forums.
    If you are new to LabVIEW then I would like to strongly recommend that you consider pursuing the LabVIEW Basics courses. The LabVIEW Basics 1: Introduction course is part of a series of courses designed to build your proficiency with LabVIEW and help you prepare for NI LabVIEW certification exams.
    The courses offer:
    The most efficient way to learn LabVIEW
    Training courses for new and experienced users
    Hands-on training with experienced LabVIEW instructors
    Basics courses to help you get started quickly
    Intermediate courses to help you learn how to optimize applications
    Advanced courses to help you learn advanced features and architectures
    The context help for linear fit VI in LabVIEW version 7.1 states:
    Finds the line values and the set of linear coefficients slope and intercept, which describe the line that best represents the input data set using the least-squares solution.Finds the line values and the set of linear coefficients slope and intercept, which describe the line that best represents the input data set using the least-squares solution.
    The context help for linear fit VI in LabVIEW version 8.2 states:
    Returns the linear fit of a data set (X, Y) using the Least Square, Least Absolute Residual, or Bisquare method
    If you then click the detailed help link in the context help window it will fire up the LabVIEW help document file where the help file explains the differences between Least Square, Absolute Residual and Bisquare method and equations are given.
    I have attached the help file to this forum. Have you considered upgrading to the latest release of LabVIEW? It is jam packed with even more technology.
    Check out the release notes for more information on what’s new with a particular release. Please goto www.ni.com/manuals
    I have also found a similar discussion forum link that might be offer some help on the issue this explains a programmatic approach to curve fitting using low level VI’s in LabVIEW.
    http://forums.ni.com/ni/board/message?board.id=170&message.id=181569&requireLogin=False
    I hope this helps
    Best Regards,
    Kirtesh Mistry
    National Instruments UK & Ireland

  • Linear Fit errors

    I am trying to make use of the "Linear Fit" and "Linear Fit Coefficients" vi's, but I am getting errors despite inputting what I thought was correct. If I connect my two 1D data arrays to the 'X' and 'Y' input terminals then I get the error -20002.  If I connect empty arrays, I get the error -20006.  I'm leaving all the other inputs unconnected.
    In looking for a solution to this, I came across something altenbach said a few years ago:
    altenbach wrote:
    Some possible errors that can occur with linear fit (but they would generated different error codes):
    You have only a two-column file. In this case you need columns 0 and 1 (column 2 does not exists) error -20002
    You have only one row, thus only one data point. error -20006.
    I only half-understand what he meant, and/or how it would apply to what I'm doing wrong.  Can anyone help me out here?
    Never say "Oops." Always say "Ah, interesting!"
    Solved!
    Go to Solution.

    Please attach code.
    -20002 states that the input sequences must be the same size.  So X and Y need to be the same length.  Verify this first.
    -20006 states that the input lengths must be at least 2 elements.  So passing in empty arrays makes perfect sense here.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Adobe Acrobat Professional version 9

    We are running Acrobat professional version 9, would like to install the update 9.3, do I need to install the prior updated first and can I just install 9.3? Please advise.
    Thanks

    Depending on the version that you currently have, you must step up versions. 9.0 to 9.1 to 9.2 then finally to 9.3. In order for us to get to 9.3, we had to install 9.2 first (we were on version 9.1.3). If anyone has a better method that would save time, but I do not know of any easier methods at this time. Perhaps someone could bundle all the updates into 1 MSI installer.

  • Why can't I upgrade my student version of creative suite to a professional version?

    I purchased the student version of creative suite 6 in January to learn the software for a class that my job was paying me to take.  We decided that the software was worth investing in so my company wants to upgrade my student version to a professional version.  ( It turns out I am not allowed to use student version software for professional purposes - I don't know if that is a law or just a rule).  So I call up customer support to pay for the upgrade and cancel the student version.  I am told this isn't possible and that they have to create a whole new account and charge me a cancellation fee for my old account.  Then they send me to a sales rep who was a total jerk and told me he couldn't help me and spent 20 minutes seriously making fun of me.  What kind of sales rep makes fun of people?  Then he sent me back to customer support who of course couldn't help either and they had to then sent me to a cancellation guy.  By this time, I had been on the phone for an hour.  So this guy tells me my current contract requires me to pay $79 a month and to cancel it will cost my $280? WTH?  My student version costs only $30 a month.  I have invoices to prove it.  So then he charges me $112 to cancel but he can't set up a new account.  Of course, that has to be done by somebody else.  But after this horrible experience, why should I sign up AGAIN?  And why did I have to pay $112 to cancel when what I really wanted was an upgrade?

    Fasiababy1 I am sorry that you have had a difficult experience.  As Ned mentioned if you have an annual contract then your best option is to continue utilizing the student version of the software.  You are also welcome to use the Student and Teacher Edition commercially you can find more details in the Education FAQ - http://helpx.adobe.com/x-productkb/policy-pricing/education-faq.html.  In specific the following element is relevant to your inquiry:
    Can I use Student and Teacher Edition products commercially?
    Yes, Student and Teacher Edition products can be used commercially.
    In addition for more details regarding canceling your subscription please see our discussion regarding questions for your Creative Cloud subscription at http://forums.adobe.com/thread/1146459.
    Finally do you have a case number which I can reference from your interaction with our support team?

  • How to create form fields in Adobe Professional version 8

    Hello,
    I have been trying for some time now to get a form in place. I have used an existing form and I am working in Adobe Professional version 8.
    I went to tools, forms and than I thought I had to click on text field tool. But than it asks me to name the text field. I want to keep the name fields blank and have them completed by the persons I will send it to (or actually this form will be posted online). The other persons should be able to open, complete, save and return it by email.
    please advise me what to do.
    Your help section brings me all the time to the Life Cycle which I think is not appropriate for the purpose I need it.

    Thank you for your advises but I have the impression my initial question is still not being answered.
    I have tried to create the fields in Adobe Pro 8 version, via forms, text field tool and named all the fields.
    Than I saved it and enabled the usage rights for Adobe Reader but opening this file from another computer in Adobe Reader, it allows me only to add comments and markups in the document, not filling out the form in the form fields I thought I created before?
    Now what to do? Did I do something wrong with the creation of form fields, can you please describe the exact path/steps to take?
    Appreciate your prompt reply.

  • Need help with Different approaches to setting variables in a Flash movie in Adobe Flash CS3 Professional Version

    Hi,
    I'm using Adobe Flash CS3 Professional version of Flash
    software,
    I need help and guidance on
    Different approaches to setting variables in a Flash movie,
    what I should do in the fla file, and in the html file.
    Thanks, Gil

    Hi petro_jemes,
    Just a little claritification, you need to add the value to the variable "[string]$ou", and also change the language in the variable "$emailbody" in the function "Get-ADUserPasswordExpirationDate".
    I hope this helps.

  • I just updated to iTunes 11. This version will not allow me to change info on any songs. Have always use "command i" with previous versions. Anyone else experiencing this problem? A solution?

    I just updated to iTunes 11. This version will not allow me to change info on any songs. Have always use "command i" with previous versions. Anyone else experiencing this problem? A solution?

    Hey! I had the same problem you did just today when I was trying to get my second iPhone to sync. What you need to do with music or anything extra that you doing you have to creat a second playlist or picture or anything that you would like to use, so that you can add to the second device that you are going to be using. I am not sure if that will help but it helped me out a lot!! Good luck!

Maybe you are looking for

  • Disc Burner or Software Not Found

    I have been browsing forums and chats and all over the place about this. My issue was not an issue until I updated to 9.1. No problems burning before. No change in hardware, no change in discs, not burning a purchased disc that has been maxed out. On

  • Reports export in Hyperion Analyzer ver. 7.2.5 gives error ?

    Environment: OS : Windows server 2003 sp2 IBM websphere application server 5.1.1.10 Oracle database version: 10.1.0.2 JRE : 1.4.2_12 I installed the hyperion analyzer v 7.2.5 build 36 with last supported version of oracle 10g i.e 10.1.0.2.I'am able t

  • How to view sub folders on Apple TV

    I have Home Sharing turned on.  I have a folder on my server that has my videos.  I have sub folders in this make folder, such as Home Movies -> Kid 1 or Home Movies -> Kid 2. When viewing these video files on my Apple TV's I see the content in the M

  • Created image of volume not drive, is there a way to restore from that image?

    Hello so my hdd failed and I made a image of the volume accidentally rather than the drive, now when I try to restore from the image it says that you need to scan image for restore, but everytime I try to do it, it fails. Do you know a way to bypass

  • ITunes 11.0 installation problems

    I have downloaded and installed the iTunes 11 update twice and it keeps saying it is a corrupt file to re-install... any ideas? I'm running windows XP......