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 for Programming
 LabTalk Forum
 Calculation from sheet to another one ?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

tbarrou

France
36 Posts

Posted - 01/12/2010 :  12:50:59 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
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.

easwar

USA
1964 Posts

Posted - 01/12/2010 :  2:50:02 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
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