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
 Calculation with imported variables

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
jdwatson Posted - 06/24/2011 : 4:38:45 PM
Origin Ver. and Service Release (Select Help-->About Origin): 8.0 SR6
Operating System: Win7

Hi,
I'm working on an analysis template with the import wizard, and I'm not sure how to access a user defined variable to include it in a calculation. I have a header that looks like the following:

10:32:52 AM 06/24/2011
Setpoint = 5.000000 T
Current = 0.200000 (uA)
Ramp rate = 1.000000 T/min
Sample 6-13-11.2-c
Current from 1.000000 to 13.000000
Vxx: 16.000000 minus 14.000000
Vxy: 3.000000 minus 15.000000
Dark
Resistivity = 57.600000 (Ohms/sq)

I can successfully put the resistivity value into the user variable "Rho", and one thing (among others) that I want to do is a simple calculation 1/(1.6E-19 * Rho * another value I calculate). The problem is the syntax for accessing the variable. I can display the variable in the command window using the command

page.info.user.variables.rho$=

and I can even assign it to a variable (I chose 'aa' just for kicks) and it displays properly when I type aa$= <ENTER>. However, Origin doesn't want to let me do any math with this variable. If I say 10*aa$= <ENTER> I just get the message "#Command Error!' I'm not sure if the variable is the wrong data type (do all imported variables get set to be strings?), or if it has something to do with it being a global variable (that's what the $ indicates?). Any help would be appreciated as I haven't been able to find an answer in the Origin help. Thanks

John
1   L A T E S T    R E P L I E S    (Newest First)
Hideo Fujii Posted - 06/24/2011 : 4:46:16 PM
Hi,

aa$, as indicated by $ mark, is a string variable. To use it as a numerical value, you can convert it like:

%(aa$)

Hope this helps.

--Hideo Fujii
OriginLab

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