LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Average

Hi everybody,

 

I have small problem with average my data by labview, I use labview 12.

The vi description.

I read two value simultaneously by snapping the data from the lock in amplifier by GPIB.

The data is simply two voltage one is corresponding to magnetic field and one is light intensity.

The problem is my magnet power supply is very old one so I can only control the sweeping of the field not the field value. So I used to sweeping the field and read the data 10 times every 100 ms and then average to have one point then save every point into 2D array I quit the measurement when the field is at certain value for example 150 (I don't have another solution). And after the hall measurement finish I repeat it for several time for example 20 time.

Then I average the all 20 times measurements and have only one single measurements. I show the average data life after every scan.

 

 

This is not problem the problem is

I quit the measurement when the field is at certain value for example 150. This make the number of point in every array are not equals. Which make shift in the average.

 

 

I asked if there are vi or function can average such array in specific tolerance, for example with tolerance 0.5 the data between 99.5 to 100.4 is belong to one data point 100 and then rearrange the array according to this tolerance and then average.

 

 

 

0 Kudos
Message 1 of 7
(2,550 Views)

Unfortunately, your description of what you are trying to do really is too confusing to be able to help.

 

If you attach an example of the data you are getting, and what you want it to be, then it might be possible to guide you on how to get from point A to point B.

Message 2 of 7
(2,548 Views)

thanks alot for the fast reply.

this is an example for 5 times scanning. the first two column is the average. as you can see the point is not arranged which make the average not OK, even i have some zero in the end.

i need to rearrange the date and calculate the average.

 

0 Kudos
Message 3 of 7
(2,523 Views)

I don't see what you mean by "the point is not arranged".

 

And "some zero in the end". What zeroes are you talking about?

 

How do you want to arrange the attached .txt file?  What averages do you want to calculate?

0 Kudos
Message 4 of 7
(2,502 Views)

for example see the pic attached.

you can see this points which i marked by read is not in the range, the difference between them is bigger than my error bar.

and in the end you can see the same problem and some zero data points are exist.

Download All
0 Kudos
Message 5 of 7
(2,476 Views)

I'm not going to be able to try to help you anymore.  I still don't understand what you want.

 

Your pictures are just a bunch of numbers where some of them are circled.  There is no clear definition of what is "not in the range", or what difference, or what error bar you are talking about.

 

Since I feel that you are the only one who truly knows what you are looking for, you are just going to need to work it out.  Sit down, study your problem, make up a flow chart of how you want to process the data, then start coding from that.  You don't have a LabVIEW problem here.  You have a data analysis problem which we can't help with.

0 Kudos
Message 6 of 7
(2,456 Views)

thanks for try to helping me,

 

i think you are right it is so difficult to understand.

for data analysis i can do this after word but it is time consuming, so i was think, if it is possible to do this during collecting the data. but it seems it's difficult by labview (i didn't think so).

 

So i thank you again for trying to help.

0 Kudos
Message 7 of 7
(2,441 Views)