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
 Origin Forum
 Min/Max function from script

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
yt47106 Posted - 08/17/2011 : 06:37:30 AM
Origin Ver. and Service Release (Select Help-->About Origin): 8.5 SR1
Operating System: winXP

Hi,

probably very basic but anyway:
the max- and min-functions doesn´t seem to work when running from script window (nor as an advanced filter script), it only produce following message:
"incorrect number of arguments passed to function: Min"
When executing as a "Set Column Value"-formula it works perfectly well.
Is there a way to rewrite the min/max-function to get it work as a script?

regards Bjorn

1   L A T E S T    R E P L I E S    (Newest First)
Hideo Fujii Posted - 08/17/2011 : 10:31:21 AM
Hi Bjorn,

As you didn't describe what you fed to the Min function as the arguments, it is not clear what happened. But, as described in the LabTalk help, Min/Max/Mean function takes a vector (column, range, matrix, list...) as its argument. For example, the all following codes work:
  mymin=min(col(B));

  range myrange=[Book1]Sheet1!col(2)[1:10];
  myrngmin=min(myrange);

  mymatmin=min(MBook1);

  mylistmin=min(8, 3, 2, 6, 6);
Maybe you can post your snippet here?

--Hideo Fujii
OriginLab

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