02-08-2018 09:19 AM
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.
Solved! Go to Solution.
02-09-2018 07:27 AM
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.
02-09-2018 07:50 AM
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…
02-09-2018 08:33 AM
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.
02-09-2018 08:37 AM - edited 02-09-2018 08:37 AM
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!
02-09-2018 08:41 AM
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?
02-09-2018 09:04 AM
Could you help me for the second question ? I figured out for the first one. Thank you
02-09-2018 10:25 AM - edited 02-09-2018 10:25 AM
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.
02-09-2018 10:36 AM
Hi arteitle,
could you modify my code so that i could a better understanding.
02-09-2018 10:39 AM
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.