LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Tolerance display for a line of best fit

Solved!
Go to solution

Hello, i am extracting 2 sets of data namely current and irradiance from a file and i plotted current(y-axis) against  irradiance(x-axis). Using the Linear Fit VI i came out with the line of best fit. I have two  questions:

1. How can i display the tolerance between the data and the line of best fit ?

2. I want to extract values of voltage and temperature whose irradiance differ by 1-2 W/m2 from 200,400 and 800 W/m2. Can anyone help me out please ?

Please find my code and a data file attached below. Thank you.

Download All
0 Kudos
Message 1 of 20
(3,387 Views)

Hello, i am extracting 2 sets of data namely current and irradiance from a file and i plotted current(y-axis) against  irradiance(x-axis). Using the Linear Fit VI i came out with the line of best fit. I have two  questions:

1. How can i display the tolerance between the data and the line of best fit ?

2. I want to extract values of voltage and temperature whose irradiance differ by 1-2 W/m2 from 200,400 and 800 W/m2. Can anyone help me out please ?

Please find my code and a data file attached below. Thank you.

Download All
0 Kudos
Message 2 of 20
(3,356 Views)
Solution
Accepted by topic author kishan1994

Hi kishan,

 

How can i display the tolerance between the data and the line of best fit ?

You want to see the difference between data and best fit? Why don't you subtract best fit from data???

 

I want to extract values of voltage and temperature whose irradiance differ by 1-2 W/m2 from 200,400 and 800 W/m2.

So you need to get that irradiance array, search all elements near your setpoints and pick the elements of the voltage and temp array at the same indices.

You need an autoindexing FOR loop, an InRangeAndCoerce function and conditional output tunnels to solve your homework…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 3 of 20
(3,346 Views)

Hi GerdW,

 

Can you help me in making the changes in the code for both parts please ? I really need some help here. It is a part of my assignment and i am new to LabVIEW. If you could do the necessary in the code, it would really help me out.

 

0 Kudos
Message 4 of 20
(3,342 Views)

Hi kishan,

 

It is a part of my assignment and i am new to LabVIEW.

It's your assignment, so I suggest to go through those free learning resources offered by NI!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 20
(3,338 Views)

I know its part of my assignment and you have given me the solution, but if you could help me a little more. How can i get the best fit array so that i can subtract the best fit from the data?

0 Kudos
Message 6 of 20
(3,335 Views)

Could you help me for the second question ? I figured out for the first one. Thank you

0 Kudos
Message 7 of 20
(3,330 Views)

wrote:

 

2. I want to extract values of voltage and temperature whose irradiance differ by 1-2 W/m2 from 200,400 and 800 W/m2. Can anyone help me out please ?


It doesn't look like any of your data meet that criterion, but if it did, there are several ways to do it. One way is to feed your two arrays, I1 and H1, through one For loop, with autoindexing enabled for them both. Inside the loop you'll be working on a single pair of I1 and H1 values at a time, so you can decide whether they meet your criteria. Give your loop a pair of conditional autoindexing outputs for the I1 and H1 values, and make meeting your criteria the condition of the outputs.

0 Kudos
Message 8 of 20
(3,318 Views)

Hi arteitle,

 

could you modify my code so that i could a better understanding.

0 Kudos
Message 9 of 20
(3,314 Views)

Yes but I'm not going to. I know I was fairly brief with my explanation, but if you have specific questions about what to do I'd be happy to answer them.

0 Kudos
Message 10 of 20
(3,311 Views)