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
 How to set different columns with one value

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
Jamestrap Posted - 09/17/2012 : 5:33:12 PM
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
1   L A T E S T    R E P L I E S    (Newest First)
JessieWoo Posted - 09/18/2012 : 02:43:40 AM
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 it’s 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.

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