The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
 All Forums
 Origin Forum for Programming
 LabTalk Forum
 Limit

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

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.

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000