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
 Quick Check function error

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
LCG Posted - 12/06/2012 : 6:43:55 PM
Hello,

I've programmed this in OriginLab9.0 and I'm getting an error in the quick check that says :" "for (H" is not a valid Equation. The left hand side of '=' should be a variable."

I'm not sure how to fix that because I'm not sure what it means.
Here's the entire function body. Thanks for any help.

A=Ki*Kg;

B=Ki+Kg+Ki*Kg*It+Ki*Kg*x-Ki*Kg*Ht;

C=1+Ki*It+Kg*x-(Ki+Kg)*Ht;

D=-Ht;

for (H=Ht, step=1; abs(step)>1E-15; H=H-step){

step=(a*H*H*H+b*H*H+c*H+d)/(3*a*H*H+2*b*H+c);};

y=Ei +((Ki*H*Ehi-Ki*H*Ei) / (1+Ki*H))
3   L A T E S T    R E P L I E S    (Newest First)
Sam Fang Posted - 12/08/2012 : 02:56:17 AM
It seems there is a redundant semicolon in your script:
-----------------------------

for (H=Ht, step=1; abs(step)>1E-15; H=H-step) {

step=(a*H*H*H+b*H*H+c*H+d) / (3*a*H*H+2*B*H+c) ; } ;

------------------------------

It should be changed as:
-----------------------------

for (H=Ht, step=1; abs(step)>1E-15; H=H-step) {

step=(a*H*H*H+b*H*H+c*H+d) / (3*a*H*H+2*B*H+c) ; }

------------------------------

Sam
OriginLab Technical Services
LCG Posted - 12/07/2012 : 8:19:19 PM
Thank you Sam for answering. I've changed to labscript and I had to change something in my equation, so now it's

A=Ki*Kg;

B=Ki+Kg+Ki*Kg*It+Ki*Kg*x-Ki*Kg*Ht;

C=1+Ki*It+Kg*x-(Ki+Kg)*Ht;

D=-Ht;

for (H=Ht, step=1; abs(step)>1E-15; H=H-step) {

step=(a*H*H*H+b*H*H+c*H+d) / (3*a*H*H+2*B*H+c) ; } ;

y=It *(Ei+Ehi*Ki*H)/ (1+Ki*H)

Where Ki,Kg,Ei,Ehi are parameters and It and Ht are constants but now I'm getting this error when I do the quick check.

y = 0 (Variable(s) "Ehi,y,Ei" not used)

Thank you again for your help.


quote:
Originally posted by Sam Fang

You should choose LabTalk Script instead of Equations in Function Type of Name and Type page. Equations doesn't support for script.

Sam
OriginLab Technical Services

Sam Fang Posted - 12/07/2012 : 12:46:27 AM
You should choose LabTalk Script instead of Equations in Function Type of Name and Type page. Equations doesn't support for script.

Sam
OriginLab Technical Services

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