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
 How to set different columns with one value
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

Jamestrap

2 Posts

Posted - 09/17/2012 :  5:33:12 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hi,
I have promlem with set column values.
For example, set C6[2:6] to 0, and C7[2:11] to 0, until Cn[2:(6+(n-6)*5)] to 0.
so, it is basically the cells in a row is increase by 5.

Is it possible ?

thank you guys

JessieWoo

China
46 Posts

Posted - 09/18/2012 :  02:43:40 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,
You can use LabTalk scripts to set the cells value to 0. Run the following scripts in the Script window (from menu, Window: Script Window, if its not opened).

//define start column, e.g. col(2)
int colStart=2;
//define end column, e.g. col(4)
int colEnd=4;
//loop from start column to end column
for(jj=colStart;jj<=colEnd;jj++)
{
//define the end row
int rowEnd=colStart+(jj-colStart)*5;
//loop from row2 to rowEnd
for(ii=2;ii<=rowEnd;ii++)
{
//cell(rowNumber,colNumber)=0
cell(ii,jj)=0;
}
}


Best Regard,
Jessie
Originlab Corp.
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