| T O P I C R E V I E W |
| Karlito |
Posted - 08/23/2004 : 07:01:35 AM Hallo Would anybody please know how to write a script for a certain procedure please. I acquire a MFC data via a DAQ board. The data is xyyyy data where the x is time and the yyyy are values of respective MFC channels. The scanning rate is lets say every 100 ms. Is there a way to calculate automatically an average value of each channel in an increment of 20 minutes. So it would scan the channels from row one to 12000 calculate an average value for each channel on this add these somewhere to a column etc. Then from row 12001 to 24000 calculate the averages again and so on till the end of the worksheet (app. 750 000 rows). Thank's a lot for any suggestions Sincerely Karlito |
| 2 L A T E S T R E P L I E S (Newest First) |
| Karlito |
Posted - 09/06/2004 : 07:57:47 AM Dear Mike
Thank you very much for your hint. It does exactly what I wanted to do.
Sincerely
Karlito |
| Mike Buess |
Posted - 08/23/2004 : 07:31:41 AM Hi Karlito,
This will duplicate the MFC worksheet and average each column 12000 rows at a time...
nn=12000; get col(1) -e npt; // total # of rows win -d; // duplicate wks doc -e W {%W=%H}; // %W is name of new wks loop (i,1,wks.ncols) { %(%W,i) = ave(%(%H,i),nn); }; set %W -er npt/nn; // remove unecessary rows win -a %W; // activate the results
Mike Buess Origin WebRing Member |
|
|