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
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum
 Origin Forum
 using column value as an address
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

naeem498

17 Posts

Posted - 05/07/2012 :  02:57:26 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
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).

Hideo Fujii

USA
1582 Posts

Posted - 05/07/2012 :  10:03:02 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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

Edited by - Hideo Fujii on 05/07/2012 10:29:59 AM
Go to Top of Page

naeem498

17 Posts

Posted - 05/08/2012 :  02:53:12 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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).
Go to Top of Page

Hideo Fujii

USA
1582 Posts

Posted - 05/08/2012 :  10:10:36 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
Go to Top of Page

naeem498

17 Posts

Posted - 05/10/2012 :  02:46:19 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thank you
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000