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
 Origin Forum
 declaration of Variable
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

ghorycon

China
4 Posts

Posted - 02/24/2012 :  02:49:12 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. : 7.5
Operating System:win XP
Hello, i'm very new to origin and am having a few troubles.
I tried the following funciton
Parameters: y0,xc, w, A
Indep var: x
Dep var: y
Function code:
y = y0 + 4*A*exp(-z)/(1+exp(-z))^2
z = (x-xc)/w
After compiling,the error is shown by "Variable "z" not declared".
I want to know how to declare the Variable "z".?
Please advice!!! Really need the help!!!

easwar

USA
1964 Posts

Posted - 02/24/2012 :  10:58:15 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

Try changing to:

double z = (x-xc)/w;
y = y0 + 4*A*exp(-z)/(1+exp(-z))^2;

Easwar
OriginLab
Go to Top of Page

ghorycon

China
4 Posts

Posted - 02/25/2012 :  7:49:32 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Easwar,
It works now successfully ! Thank you very much for your attention!
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