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
 strange parameter behavior

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
byrdin Posted - 03/10/2006 : 04:32:11 AM
Origin Version (Select Help-->About Origin): 7.0552
Operating System: xp pro


i fitted multiple datasets with a biexponential.
now i want to reorganize the values in the parameter worksheet so that i can plot the amplitudes of the two phases as function of the dataset number. That is: all A1 in one column, all A2 in another and the corresponding lifetimes in the column label. thats easily done if you know which parameter is where.

For a script in the more general case of multiple parameters, to put things in the right columns,(i guess) i have to use the variable names in the first column of the parameter worksheet. There,in my example, in the third line is written "t1" and in the fifth is written "t2".
BUT: %(parameters1,1,3) == %(parameters1,1,5) gives true!
what does that mean and how do you deal with it?
2   L A T E S T    R E P L I E S    (Newest First)
Mike Buess Posted - 03/20/2006 : 4:05:45 PM
quote:
For a script in the more general case of multiple parameters, to put things in the right columns,(i guess) i have to use the variable names in the first column of the parameter worksheet. There,in my example, in the third line is written "t1" and in the fifth is written "t2".
BUT: %(parameters1,1,3) == %(parameters1,1,5) gives true!
In order to compare two string variables you need to quote both variables...

if( "%(parameters1,1,3)"=="%(parameters1,1,5)" ) type TRUE;
else type FALSE;

Likewise with Fred's method...

%A=%(parameters1,1,3);
%B=%(parameters1,1,5);
if( "%A"=="%B" ) type TRUE;
else type FALSE;


...If you are comparing a string variable with a string (constant) you don't need to quote the variable. In other words, this test will work...

if( %(parameters1,1,3)=="t1" ) type TRUE;
else type FALSE;

Mike Buess
Origin WebRing Member

Edited by - Mike Buess on 03/20/2006 4:20:56 PM
fzimnoch Posted - 03/20/2006 : 2:07:29 PM
Hello Byrdin:

The worksheet created by the advanced curve fitter is just an ordinary worksheet so it's values can be addressed or set as with other worksheets.

Perhaps you should consider using the Labtalk %( ) Substitution notation.

So during script execution, a ‘worksheet information expression’ surrounded by %() is evaluated and replaced with the worksheet information it represents.

To return individual cell contents, use the following syntax:

%(worksheetName, columnNumber, rowNumber);

For example, if the third cell in the fourth column in the data1 worksheet contains the value 25, then entering the following statement in the Script window:

A = %(data1, 4, 3)

sets A equal to 25.

The %() substitution notation can be combined with system variables. For example, entering the following script in the Script window:

%(%H, selc1, selr1) =

returns the element in the top left cell of the current selection range.

To return the contents of a text cell, use a string variable:

%A = %(data1, 4, 3); %A =

I hope this helps.

FRED

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