11-05-2013 03:44 AM
Hi,
I am trying to implement a linear fit between two cursors, as I am using total of 4 cursors. I would like to implement linear fit between cursor 2&3. Please help me how to implement it and to find a slope. I am also attaching my code.
Solved! Go to Solution.
11-05-2013 03:56 AM - edited 11-05-2013 03:59 AM
Hello phanikiran,
It's just building an array of the two elements and simply connect them.
Hope this will help you!
Though I have some questions about your code, why are you using a while loop which you end in 1 iteration?
The rest of the code is just floating around and above the while loop.
Try to make it more rectangular shaped so you can see how the dataflow is intended.
Koen
11-05-2013 04:05 AM
hey thank you very much, its working for me. Yeah I will just check my code once regarding the while loop.
11-05-2013 04:14 AM
Let me help you a bit.
The two property nodes you use for the slope are excessive you can simply use the ones you already use for SiO2 indicator
11-05-2013 04:45 AM
Hi Koen,
Thanks a lot, I have done the same thing.
Once again Thank you.
11-05-2013 05:06 AM
Phani,
Did you already succeeded with deleting the while loop?
If you need any help with that or something else don't hesitate to ask.
Koen
11-05-2013 05:15 AM
Hi Koen,
Yes I can run. If I have some questions definitely I will contact you.
11-05-2013 08:10 AM - edited 11-05-2013 08:10 AM
Hi koen,
Now I would like to merge both graphs i.e., Bestfit and XY Graph (in the block diagram). Can you suggest me, I have tried with build array and concenate Inputs function, but no use. Dont mine as I am new to Labview. Thanks in advance.
11-05-2013 08:41 AM
@phanikiran wrote:
Hi koen,
Now I would like to merge both graphs i.e., Bestfit and XY Graph (in the block diagram). Can you suggest me, I have tried with build array and concenate Inputs function, but no use. Dont mine as I am new to Labview. Thanks in advance.
First, get rid of the Express XYGraph subVIs and use the "real" XY graph VIs. The Express ones get you going faster for simple things, but your options are limited.
Take your X and Y arrays for both your original points and the best fit points (just two points, right?) and combine them into clusters of arrays (instead of feeding them into the XY graph). Then combine these into an array and feed it into your graph. It's all outlined in the XY Graph section of the LabVIEW help file.
The LV Help File is your friend, learn to use it. It gets lonely if you don't look in on it once in a while.
Cameron
11-06-2013 03:59 AM
Hi Phani,
Saw you contacted me so here is the solution.
Actually Cameron already mentioned the solution above.
Anyway this it what it should look like when you implement it:
Note: The while loop is just a pretention the output aren't in correct order.
Koen