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
 A bug? blocked after parameter initialization code

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
frankwagner Posted - 03/10/2006 : 12:36:23 PM
Hello,

Is this a bug?

Using a particular function I stay blocked on the initialization code script tab every time I open it!!! I need to close the fitter, and reopen it in order to get to another tab. -- strange, it does not do this with other functions.

Thanks for your comments,

Frank

Details below:

I have a function (Origin C):
double u; // argument of arctan
const double z = pi*w^2*n/(lambda*M2); // raleigh length
u = sqrt(F/thresh - 1);
p = 1.0 - exp(-defden * 4.0/3.0*pi*w^2*z*(u^3/6.0 + u - atan(u)) );
parameters are: thresh,defden. Indepentent variable: F

and a parameter initialization code (origin C):
int i=1;
while (p_data[i]==0) {i++;};
thresh=F_data[i];
defden = 1e4; // defects / mm3 as general staring value
enable automatic... is checked (or unchecked)
and some constants:
n=1.5
lambda=1064.0e-6/*mm*/
w=15.0e-3/*mm*/
M2=2
entered on the same script tab.
6   L A T E S T    R E P L I E S    (Newest First)
Mike Buess Posted - 03/14/2006 : 09:41:20 AM
quote:
(I wrote the comments in a text file.. less elegant, but it works)
You can also put them in the initialization script section at the bottom of that tab...

// comment about lambda

That way they're saved with the fdf file.

Mike Buess
Origin WebRing Member
frankwagner Posted - 03/14/2006 : 06:21:17 AM
quote:

Hi Frank,

Comments belong after the semicolon...

lambda = 1064E-6; //mm

Mike Buess
Origin WebRing Member



I think Origin does not accept any comments in the "constants" field.

I tried it. In the C-file, a comment after the semicolon yields:
const double lambda=1064E-6;
const double //mm;

And the code does not compile
compiling...
_nlpcourbeSeuilVol3D2defauts.fit
FEEDBACK macros not defined
\OriginC\NLSF\_nlpcourbeSeuilVol3D2defauts.fit(42) :Error, invalid identifier, check using as name:

(I wrote the comments in a text file.. less elegant, but it works)

Frank
Mike Buess Posted - 03/14/2006 : 05:50:51 AM
Hi Frank,

Comments belong after the semicolon...

lambda = 1064E-6; //mm

Mike Buess
Origin WebRing Member
frankwagner Posted - 03/14/2006 : 03:26:42 AM
I found the problem. When I remove the unities from the constant field the tabs switch correctly. Could you change this please. It's quite useful to have the unities written as comment after the unities.

In "scripts" "parameter initialization"

"lambda=1064E-6" is ok
but
"lambda = 1064E-6 //mm;" blocks the tab.

Best regards,

Frank
frankwagner Posted - 03/14/2006 : 03:12:59 AM
The Origin version is 7.5 SR4 (7.5853 B853), and I'm working on Windows XP (SP2) with automatic update function.
Leo_Li Posted - 03/13/2006 : 9:02:35 PM
Hi frankwagner,

We would like to know your Origin version number?



Leo
OriginLab Corp.

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