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
 add to each column the max of previous column
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

Alex-Z

1 Posts

Posted - 12/16/2014 :  3:20:48 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hello!
I need to add to each column the largest value of the previous column.
Thanks in advance!

jasonzhao

China
262 Posts

Posted - 12/16/2014 :  8:53:12 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hello,

Please use the Script below for add to each column the largest value of the previous column.


Dataset _max;

for(i=1;i<wks.nCols;i++)
{
_max[i]=max(col($(i)));
}


for(i=1;i<wks.nCols;i++)
{
col($(i+1))+=_max[i];
}


Best regards,
Jason Zhao
OriginLab Tech
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