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
 using column value as an address

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
naeem498 Posted - 05/07/2012 : 02:57:26 AM
Hi,

Can I make a value in a column as an address. e.g. I want to see maximum value in col(B) and take the value of col(A) in the same row then put it in col(C).

Col (A) Col (B)

12 23
23 16
44 19

Now I want to take 12 into col(C).
4   L A T E S T    R E P L I E S    (Newest First)
naeem498 Posted - 05/10/2012 : 02:46:19 AM
Thank you
Hideo Fujii Posted - 05/08/2012 : 10:10:36 AM
Hi naeem498,

Then,

sum(col(B));
col(C)[sum.imax]=col(A)[sum.imax];

though this goes apart from your title "using column value as an address".

Hope this is what you wanted.

--Hideo Fujii
OriginLab
naeem498 Posted - 05/08/2012 : 02:53:12 AM
Thank you Hideo, I am sorry for not being clear enough. In col(C) I want the value of col(A) not col(B).

In col(B) lets say 23 is the highest number at row 10. Now I want the value of col(A) in row 10 to be copied in col(C).
Hideo Fujii Posted - 05/07/2012 : 10:03:02 AM
Hi naeem498

Please try the following two-line script:

sum(col(B));
col(C)[col(A)[sum.imax]]=sum.max;

It puts the max value of col(B), 23 at the 12th(as indicated in col(A)) row of col(C).

--Hideo Fujii
OriginLab

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