Fitting output of XY Graph

Hello, I'm trying to fit the output of an XY
graph which is (1-D Array of Cluster of 2 Elements(2x 1-D Array of
Double[64-bit Real])). It seems like instead of having one array with
two columns X,Y indexed persample number, I want to have a 1-D Array of
Column Y , indexed by X. Any ideas?
Thanks.
 I'm getting NaN on the slope and intercept
of the Linear Fit VI outputs, is there a way to take the output of the XY Graph Local
Variable feed it into the Curve Fitting VI and then add the fitted
curve back into the XY graph? It seems like it does not like the Output
of the Graph.
Thanks. 
Attachments:
fit.PNG ‏13 KB

Hi Lefterisa
Can you post an example VI with your data in it so we can further look into this. Be sure to have as many elements in the X as you have in the Y for them to properly form coordinates. The basics behind this function is that it needs a set of x and y data to which it will return the best linear fit using the method specified in the input.
Thank You
Eric Reid
National Instruments
Motion R&D

Similar Messages

  • Trying to fit output of XY Graph

    Hello, I'm trying to fit the output of an XY graph which is (1-D Array of Cluster of 2 Elements(2x 1-D Array of Double[64-bit Real])). It seems like instead of having one array with two columns X,Y indexed persample number, I want to have a 1-D Array of Column Y , indexed by X. Any ideas?
    Thanks.
    Solved!
    Go to Solution.

    lefterisa wrote:
    I'm getting NaN on the slope and intercept outputs, is there a way to take the output of the XY Graph Local Variable feed it into the Curve Fitting VI and then add the fitted curve back into the XY graph?
    Please attach your VI and some typical data. Most likely one of your points is NaN, in which case the linear fit will fail of course.
    You really have some misconceptions. An XY graph is a data sink, and not a data source and faking it with local variables just complicates things.
    So what you should do it take the output from the xy express VI, remove the points containing NaN, do the linear fit, and send both to the same xy graph terminal. You only need to write to the graph once.
    Message Edited by altenbach on 11-06-2008 03:37 PM
    LabVIEW Champion . Do more with less code and in less time .

  • Error When creating Broadcastings "Portal theme does not fit output format"

    Hi All,
    When i create a Broadcasting Settings i am getting an Error saying "Portal theme does not fit output format", and below is the detailed that we are getting,
    "Diagnosis
    You used separate portal themes to generate PDF or print formats (PS or PCL). The output format that you selected is not appropriate for the portal theme currently set.
    System Response
    The broadcast setting is not consistent and you cannot save or execute it.
    Procedure
    Change the output format or the portal theme correspondingly. (The portal theme is set to the first valid value for the current output format when you display the corresponding tab page).
    Procedure for System Administration
      Notification Number RSRD 640"
    Can anyone help how to resolve this issue?
    Regards,
    Muruganand.K

    Would you have chance to provide me the sollution...
    We are facing the exactly the same error message
    Thanks a lot in advance
    Regards
    Ivan

  • 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

  • HTML output and missing graph

    I am developing a report having a graph in BI Publisher 10.1.3.3.0. When the report o/p is genereated to PDF, the graph is showing up, but the same report doesnt return the chart in HTML output (it shows small icon in the place of graph). I followed Tim Dexter's blog http://blogs.oracle.com/xmlpublisher/2006/10/31 here. But, I didnt understand where i need to make the settings for 'Base image URI' and 'Image file directory' .
    In the Runtime configuration properties for this report, under HTML output, I see the foll.
    -show header
    -show footer
    -replace smart quotes
    -character set
    -make HTML output accessible
    -user percentage width for table columns.
    I even tried the o/p in excel and rtf but, the graph is missing in the o/p as well.
    Thanks in advance

    Can someone help me how to get the graph in HTML?

  • How to output 3D Surface Graph as image file (bmp or jpg or png)

    I'd like to output a graph from the 3D surface.vi module as a regular
    image (like a JPG or BMP).  At this time, I'm going through an
    awkward process of taking a screen cap, then isolating the image with
    photoshop (painful and time consuming).
    Any idea or input would be appreciated.

    RIght-click on the graph and "create...invoke node". On the diagram, select method "get image".
    Save the output of "image data" as JPG, BMP, or PNG using the tools from the "Graphics Formats" palette.
    (The code shows would get a 24bit PNG image)
    See how far you get. Good luck!
    Message Edited by altenbach on 08-12-2005 02:50 PM
    Message Edited by altenbach on 08-12-2005 02:51 PM
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    GetImage.png ‏3 KB

  • Same value to be output to one graph for statistics in excel graphing.

    Hello Guys,
    I've been inputting values that spans multiple columns and rows to create a graph.
    Take for an example, i had value on A1:A9 and results would be spanning across  B1:D9.
    I would like to create a graph that has A1:A9 displaying on the x axis. While Results on B1:D9 to be analyzed and output to one specific bar on the graph.
    Let's say at x axis representing dates while y axis representing car plates moving on the same road.
    On 20th january we had 3 cars passing by and input into the grid. The same car plate that were commonly passing by the given area will be reflected on the graph at how many times it appeared. 
    I tried to look everywhere for my answer. However, i fear that this might requires and a simple graph will not be able to work out to what i wanted.
    Need some advise here.
    Thankyou.

    Could you please specify, which elements should be on the x-axis? Once you said "A1:A9", but also "dates on the x-axis".
    What's on the y-axis? The number of unique cars that have passed that certain day?
    In my eyes, the issue is not the graph (Excel is capable of that), but more the structure you want to have. I guess, you have to do some data rearrangements in order to get the designated result.

  • 2 real-time plots + curve fits on the same x-y graph

    Hello all-
    Per the title, I'm trying to plot two series, both in real time, plus curve fits for each series on the same x-y plot.  Some background on the subject - this will be used to show the temperature distribution across a counter-flow heat exchanger.  So the x-y plot will plot temperature vs. position for two different flow streams - a hot flow stream, and a cold flow stream.  I would like to plot them both on the same graph so the temperature relationship between the two flows can be clearly seen.  If I can plot 2 series with simple lines connecting the points that would be fine, but would prefer some smoothing on the line or using a curve fit if that is possible to do in real time.
    A screen shot of my block diagram is linked below.  As you can see, the diagram is symmetrical with the inputs from the cold flow being processed on the top, and the inputs from the thermocouples in the hot flow being processed at the bottom.  I've got 2 issues:
    1.  Plotting 2 series on the same X-Y graph in real time.  (I've done this before, but never in real time).  Am I correct in assuming, if I append the array so it is a 3-D array (X, Y1, Y2), that I can plot both series on the same X-Y graph?  The individual X-Y graphs are functional, but I would like to combine them.
    2.  I've circled a bundle output which outputs the X,Y values of a curve fit.  The output here is a string (pink wire), so I cannot plot it on the X-Y graphs which are shown, due to it being 2 different data types.  Is there any way to plot the curve fit on the same graph?  Is LabVIEW capable of doing this in real time?
    Thank you for any help...   I realize that some of the answers here may be obvious, but visualizing what's going on in LabVIEW is a bit of a challenge for me, since I'm used to seing text-based code in VBA and MATLAB.
    Attachments:
    HX Block Diagram 2.jpg ‏302 KB

    The output you have circled is a cluster of two 1D arrays, not a string.
    XY graphs take a varirty of inputs (array of points, cluster of x and y arrays, complex arrays, etc.) but you cannot mix datatypes in a single graph. Since you are graphing arrays of points (a point is a cluster of an x and y scalar), you need to do the same for the data you circled. Simplest would probably be to just wrap an autoindexing for loop around the bundle function. See how far you get.
    If you want detailed help, please attach your actual VI. We cannot debug a picture.
    LabVIEW Champion . Do more with less code and in less time .

  • Graphs and Charts output in XML Publisher Report

    Hi All,
    I have incorporated the graphs and charts as well as some bitmap images in XML Report (RTF File), When i am taking a output in pdf. it is coming fine and working properly, where as while taking the same output in excel, graphs/charts/bitmap images are not getting displayed. Only you can view the data.
    can you please suggest what's the issue on the same and how can be resolved.
    Thanks & Regards
    Ankur Dawra

    Not sure you are on the right forum...

  • Labview Graph Palette Taking Outputs

    Hi,
    is there any way to take the output of Labview Graph Palette i.e. when I zoom in can i access the minimum and maximum values of the zoomed in scales.
    What I am trying to do is scanning a square and displaying data on an intensity graph. SoI wanted to add a feature which enables me to zoom in on the graph then take the values of the new scales and scan the zoomed in area again in the instrument.
    So, is this possible?
    Thanks,
    Yatin

    In LV8.5 (not sure about 8.2) you get "scale change" events, so with an
    event structure you get new ranges every time they change.
    In <LV8.5 the only option is to poll the range properties of the graph.
    Regards,
    Wiebe.

  • How do I do a line of best fit graph!!?

    Hi guys, I need to do a line of best fit graph comparing two sets of numbers. I have the info on a scatter graph but can not find how to insert a line of best fit. The other graph options dont represent the data correctly. any help would be appreciated, thanks, Nick.

    Here's a link to how we did it in the "old days":
    http://www.regentsprep.org/Regents/math/data/linefit.htm
    http://mathdemos.gcsu.edu/mathdemos/lsq-demonew/indexnew.html
    Regards,

  • Display counter output on graph

    I have two counters generating continuous digial pulse trains from my PCI 6010, and I'm trying to display the output on a graph.  I've got the output of one counter connected to an AI line that leads to a waveform graph, but I can't get anything on the graph.  I've measured the output via external means, so I know the counters are generating the appropriate pulses.
    Eventually I'd like to have some sort of indicator for each counter that indicates whether the counter is in the 'on' or 'off' state, but I figured getting the counter outputs to diplay on a graph would be a good first step.
    My VI is below; the display part that isn't working is at the bottom of the case structure.
    Thanks.

    Once your code goes into the inner while loop your graph will never be updated since it will only execute one time. In order to update the graph continually you will need a parallel which handles the graph updates. A good way to pass data between the parallel tasks is a queue.
    Mark Yedinak
    "Does anyone know where the love of God goes when the waves turn the minutes to hours?"
    Wreck of the Edmund Fitzgerald - Gordon Lightfoot

  • FITTING IN XY GRAPH

    Hello
    I am new to LabVIEW and have problems fitting curves in xy graph.
    I can fit in waveform graph, but not in XY graph.
    Here is my program.
    Thank you for your answers.
    Solved!
    Go to Solution.
    Attachments:
    MOJI PODATKI POFITANI XY graph.vi ‏51 KB

    I have usual FIR filter which has Lower cut off frequency control. But
    it does not have taps control. Is it possible to make taps control to it or to select other block with same properties as this FILTER block?
    Thank you for your answers. 

  • Graphs and parent-child with loops and duplicates

    There is a parent-child relation in the table t(prnt, chld) which allows duplicates (A->B, A->B) and opposite paths (A->B, B->A), and complicated loops. Is there a way to identify rows that form any separate "connections network" and assign a "name" to them of any kind (letter, number, wahtever)? I try to use WITH recursive clause to identify and group rows belonging to one graph but with no luck. Any help would be appreciated.
    thank you

    Frank, I posted inputs for all graphs (multiple inserts) and some allowable outputs for one graph. For all cases (ie. graphs) the rule is the same:
    1. identify all nodes belonging to a graph
    2. "name" that graph (min, max or whatever you like)
    3. print the output in the form (node_belonging_to_a_graph, name_of_the_graph) for all identified graphs
    And as you said, I am somewhat flexible. I don't want to constrain the problem with saying min, max because it's not important how you name it, but the way which is somehow natural and fits with requirements is the usage of nodes' values.
    You ask me if (1,1),(2,1),(3,1) is also OK as an output for sample graph (1,2)+(2,3). Yes it is. It is one of those I posted but with additional node which is chosen as a name for a graph. But as you can guess it doesn't matter which node you choose, and the additional information about a node named with its own name is not as important and the information that all other nodes are named with that name but it is 100% acceptable. If you changed the naming convention and started to use letters instead of node values then yes, it would be a must to have the output in the form (1,a),(2,a),(3,a).
    You also ask me about the result for 90x data inserted as 5 rows: (901,902)..(906,904) and present sample result:
    901 902
    905 902
    906 902
    And the answer is no, it is not good result. It misses the information about the nodes 904 and 903 which belong to this graph too. The correct result could be:
    901 902
    905 902
    906 902
    903 902
    904 902
    or any other "combination" which presents 5 nodes with the name of the sixth (in this case of 6-node graph). Just one have to be picked, it doesn't matter which one. The "vertical" order is also irrelevant.
    As you can see there is a lot of room that gives acceptable result. I don't want to constraint it because it can influence performance which is important when dealing with graph structures in relational databases (RDBMS are not predestined to easily cope with that sort of information). It can also influence the chosen algorithm and I'd like to pick the fastest one which gives acceptable result.
    Two numbers x and y are in the same group (graph) if (and only if) at least one of the following is true:
    (1) they appear on the same row together (it doesn't matter which number is in which of the 2 columns), or
    --(2) x appears on the same row with a third number, z, and z is in the same group as y--
    (2) there are other edges (entries) in the table that form a "path" from x to y. And because the direction of the path is not important for the problem (ie. the parent-child table structure can be forgotten for a moment), the path means "there exists connection" between x and y aka "you can walk from x to y".
    The output consists of 2 columns: id (which is unique in the result set) and grp (which identifies the group) *[correct]*
    The id column will always be one of the numbers in the group *[correct]*
    It doesn't matter what the grp column is, or even what data type, as long as it distinguishes between the different groups. *[correct, but as you noted using one, picked number from a graph is the prefferable way]*
    If there are N distinct numbers in the group, I need N rows of output for that group, with id showing all those distinct numbers. *[correct, but if you choose your naming convention as naming a graph with the value of the node belonging to it you can ommit the node which is named for itself (but it doesn't hurt is such row appear in the result)]*
    You ask me if the graph is directed. No it's not. Your example (x,y) and (y,x) is great, and it can be concluded from my first post when I say that "opposite paths" (A->B, B->A) exists. What matters is the connection between the nodes. The parent-child table somehow imposes that direction is important, but for this problem it is not.
    One of the motivations for my post is to know what other people think without affecting their minds with my approach. I don't want to skew anybody's mind into my solution which works, but it's not effective. I don't mind showing it but I kindly ask you to think about the problem before I post it. Diversity of approaches helps to distill the best one.
    As I said I did it with the usage of sys_connect_by_path. If it doesn't appear to you as possible usage then it is likely that I don't use it efficiently. Please understand, I will post it if you ask me one more time but if you can live for a while without my inefficient solution and suggest something with WITH clause I would appreciate it.
    There is no exact result I expect. There are many results which are correct and acceptable. They all must follow the rules described at the beginning.
    Thank you
    Edited by: 943276 on Jun 28, 2012 1:32 AM

  • Problem: Fitting Lev-Mar with Error Function

    Hi everyone,
    I have very little experience with LabVIEW and I'm trying for the first time to do some NonLinear Curve fit for some data I have.
    I've searched in forums for almost a day and couldn't find what I need. The problems are:
    1) I need to fit a function of the following type: P = Po/2 - Po/2*erf(sqrt(2)*(x-xo)/w) , where Po, xo and w are my parameters.
    But in my error2.vi I cannot link my y=sqrt(2)*(x-xo)/w  variable of the erf function to the input, because the erf.vi does not accept 1D array as input and doesn't give that as output as well. The output thing is another problem, since the input of F(x,a) needs to be a 1D array.
    2) I read about the Lev-Mar NonLinear CurveFit VI and I think I got what needs to be done. However, a I was having problems in wiring my Static VI Reference to the F(x,a) input in the Lev-Mar VI and it didn't give me a broken wire only when I made de Reference a "Strictly Typed VI Reference". What does that mean? Why did it only work with that?
    I know these are some pretty basic doubts, but I've been trying to understand it for quite some time and couldn't get this done.
    Thanks.
    PS* The fitting function (subvi) is the error2.vi file.
    Solved!
    Go to Solution.
    Attachments:
    error2.vi ‏13 KB
    FittingGaussianKnife.vi ‏15 KB

    Try this. Seem to work  just fine (LabVIEW 2013).
    (don't try to graph the best parameters, graph the best fit output!)
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    FittingGaussianKnife_MODCA.vi ‏17 KB
    error2_MODCA.vi ‏14 KB
    erfit.png ‏40 KB

Maybe you are looking for

  • Can i install windows on a mac book air?, if i can, do you recomend it?

    I want to buy a new macbook air but i need to use windows, but i dont know if i can install it on a macbook air and if i can install it, is it fast? Do you recomend it?

  • Execute a function after event

    Hi experts, i want to execute a function after a event. I give you an example: Zprogram1call function zfct1. While execution of function zfct1is running, zprogram2 call function same function zfct1. But it's possible that function execution  from zpr

  • Installing Oracle Portal 10.1.2.0.2 in sleep mode

    Hi, Need help on installing Oracle portal in sleep mode that uses an installation file like an xml so that we dont manually enter the details in gui while installing Message was edited by: user619120

  • Comp not authorized?

    When I try to download a song it says that my computer is not authorized make this purchase. What do I do?

  • Popup on JList????

    Hi, I'm trying to add a right-click popup function to a JList. Could someone help me? Here is what I've done:           JList clientList = new JList(new DefaultListModel());           model = (DefaultListModel)clientList.getModel();           clientL