06-01-2010 10:01 AM
Hello,
Using the scatter graph in measurement studio, I have 5 different plots (Force Vs. Displacement) with values pretty close to each other. I am trying to find out whether Measurement studio gives me the functionality to average out all these 5 plots into one plot.
Thanks.
06-02-2010 04:33 PM
Hi adityac26,
Would you please clarify for us what you would like to accomplish by averaging the 5 plots into one? If my understanding of your question is correct, this would be very difficult, because we do not know how the points from one plot would relate to those on another plot. Because your plots are a scatter of Force and Displacement, there is not one axis that would have the same points from one plot to another. You could merge the plots by adding the points from all the graphs to one combined graph. However, I am not sure if that is what you are tying to accomplish.
Have a great afternoon,
John M
10-12-2010 09:58 PM
I am facing the same problem.
I have big data files of xls files each column of 60,000 data...
I developed a program to reduce the data-file to, 6000 data file by sampling.
Now i want to combine the data avegare it and plot it in one graph How can I do it?
10-13-2010 01:28 PM
Hi Kanika,
Please tell us a little bit more about what the data is like that you are trying to average and plot. For example, how many columns to you have? What does each column represent? And what would you like to plot?
Thanks, and best regards,
John M
10-13-2010 07:12 PM
Dear John,
The data is pressure data in excel file.....each file has 8 columns and one column has 6000 index. One columis pressure value other column is index..I want to plot simple line diagram. I want to avaerage 0 column data to the zero column data of other file continously and simulteaously for each column for 50 files.
I have around 50 files of these.
I want to make two program:
1. extract simultaneously 50 files in my program
2. Second program not all data but i can choose the files to be plotted.
But i want one graph plotting the number of files i call.
I hereby attach the one of data file for your reference.
I use Ni 1031, Labview 2009
With regrads,
Kanika
10-14-2010 03:37 PM
Hi Kanika,
Am I correct that each data file represents 8 different plots? Then, you want to average each point from each plot with the corresponding point in the same plot from each of the other files?
Also, you mentioned that you are using LabVIEW 2009, but this is a Measurement Studio forum. Are you developing in LabVIEW or in Measurement Studio?
Best,
John M
10-14-2010 06:32 PM
Hi John,
Yes! one file has 8 graph, ya i use labview also and measurement studio.
So both will be fine.
regards,
kanika
10-19-2010 02:26 PM
Hi Kanika,
In the end, you will need to create 8 separate arrays, one for each channel. Then you can plot those 8 channels onto a single graph. The process you would want to go through would be like this:
1) Initialize 8 empty arrays
2) Loop through your data to populate the 8 arrays. This could look something like the following pseudocode:
files = array(); //files is an array of the 50 files you are reading from
data = array(); //data is an array of 8 arrays.
//each array represents a final averaged channel
numColumns = 8;
numPointsPerColumn = 500;
//we will populate the channels one at a time
for(i=0; i<numColumns; i++)
{
//now we loop through each point in this column
for(j=0; j<numPointsPerColumn; j++)
{
//now, we want to get the corresponding point from each file, and put
//it into an array we can use this array to get the average value
for(k=0; k<files.length(); k++)
{
//get point from (column, row) in this file
array[k] = files[k].getValueAt(i, j);
}
//we now have the averaged value for this point
double thisPoint = array.average();
data[i][j] = thisPoint;
}
}
Now, data is a 2D array which contains the values that need to be passed to your graph. This pseudocode could be implemented in either LabVIEW or Measurement Studio.
John M
03-10-2011 08:12 PM
Thank you John!