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 for Programming
 LabTalk Forum
 Calculation from sheet to another one ?

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
tbarrou Posted - 01/12/2010 : 12:50:59 PM
Origin Ver. and Service Release (8.1 SR0):
Operating System: XP

I have 2 sheets in one workbook. the first one has 40 column with value in dB. I'd like to get 40 column of linear values in the second sheet.

I did the (very) small labtalk program below :
[Main]

int ii=0;
range Source = [Brute]LuceraPhaseCritique!;
range Feuille = [Brute]Lineaire!;

for (ii=2;ii<=2;ii++) // will be changed to calculate over all columns...
{
range r1 = Source.col$(ii);
range r2 = Feuille.col$(ii);

r2=10^(r1/1e4);

}

It creates a blank new column but doesn't compute anything... after hours reading help and testing many syntaxes, I surrender ! I don't understand how reference a worksheet, a column... and why properties and methods of objects (Source, Feuille as wks, r1,r2 as wks.col)are not efficient in this case... I obviously didn't get the rationale of Labtalk.
but this calculation is so simple...

Thanks for help.
1   L A T E S T    R E P L I E S    (Newest First)
easwar Posted - 01/12/2010 : 2:50:02 PM
Hi,

You can use this syntax to reference the cols inside your loop:


range r1=%(source)wcol(ii);
range r2=%(dest)wcol(ii);


Easwar
OriginLab

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