| T O P I C R E V I E W |
| abreiti |
Posted - 08/05/2008 : 10:29:48 AM Hello,
I have a problem with the following for-loop. The gain is, to divide the dataset in 5 area with equal size and identify the min and max-data in evrey area. Maybe someone knows another solution.
Thanks,
abreiti
Code:
%h; //current dataset kk=801; nn=0; mm=0; b=0; c=0; for (pp=1;pp<=5;pp++) { mm=(kk/5*pp); mm=nint($(mm)); limit %h_Hoehe -b $(nn) -e $(mm); b = $(limit.ymax); c = $(limit.ymin); rz$(pp) = b - c; nn=mm+1; }; |
| 2 L A T E S T R E P L I E S (Newest First) |
| greg |
Posted - 08/12/2008 : 1:04:20 PM Corrections:
// %h; Does not do anything - %H contains active page name // kk = 801; Instead, use the following get %H_Hoehe -e kk; nn = 1; // ranges start with 1 mm = 0; b = 0; c = 0; for ( pp = 1 ; pp <= 5 ; pp++ ) { mm = (kk / 5 * pp); mm = nint(mm); // mm is numeric, do not need $(mm) limit %h_Hoehe -b nn -e mm; b = $(limit.ymax); c = $(limit.ymin); rz$(pp) = b - c; nn = mm + 1; }
|
| adamleewiner |
Posted - 08/05/2008 : 3:32:41 PM I think kk is a scalar with 'kk=801' rather than a dataset; %h contains the name of the active workbook.
An USTCer always keep trying. |