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
 A problem about Fitting Complex Function
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

xuwenyu

China
2 Posts

Posted - 07/24/2011 :  03:41:39 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release (Select Help-->About Origin): 8.0 SR0
Operating System:Windows 7

I have read the tutorial on how to fitting with complex function,
but my situation is different.My ydata are all real type ,they don't have imaginery parts,and my function has imaginary unit "i".
something about fitting function as follows:
Parameters:m,l,n,c
Independent Variables: x
Dependent Variables: y
Function:
y = (1i*(m^2-1)*tan(pi*x*l*(2-1i*n)/c))/(2*m+ 1i*(m^2+1)*tan(pi*x*l*(2-1i*n)/c));

then I compile it,the result show that:
Linking...
Done!
compiling...
_nlffashexishu.fit
D:\Program Files\OriginLab\Origin8\XXX\OriginC\NLSF\_nlffashexishu.fit(37) :Error, Incompatible variable types in expression
D:\Program Files\OriginLab\Origin8\XXX\OriginC\NLSF\_nlffashexishu.fit(37) :Error, general compile error
D:\Program Files\OriginLab\Origin8\XXX\OriginC\NLSF\_nlffashexishu.fit(28) :Error, error(s) found in compiling function _nlsffashexishu
Compile Failed!
I am not good at English and not well versed in Origin C, so hope you can understand what I say and any code snippets would be extremely helpful. Thanks.

my date is that:
x y
50 0.52
55 0.365
60 0.133
65 0.467
70 0.621
75 0.62
80 0.414
85 0.347
90 0.623
95 0.6
100 0.456
105 0.112
110 0.549
115 0.658
120 0.619
125 0.378
130 0.312
135 0.593
140 0.651
145 0.585
150 0.212
155 0.371
160 0.523
165 0.558
170 0.278
175 0.121
180 0.403
185 0.511
190 0.446
195 0.177
200 0.201
205 0.459
210 0.458
215 0.292
220 0.147
225 0.354
230 0.429
235 0.185
240 0.075
245 0.24
250 0.333
255 0.211
260 0.044
265 0.235
270 0.364
275 0.29
280 0.115
285 0.264
290 0.323
295 0.312
300 0.219
305 0.242
310 0.366
315 0.394
320 0.235
325 0.148
330 0.319
335 0.398
340 0.306
345 0.173
350 0.242
355 0.383
360 0.368
365 0.264
370 0.292
375 0.377
380 0.405
385 0.289
390 0.204
395 0.298
400 0.411
405 0.376
410 0.28
415 0.224
420 0.409
425 0.421
430 0.378
435 0.219
440 0.305
445 0.38
450 0.38
455 0.267
460 0.235
465 0.304
470 0.335
475 0.299
480 0.198
485 0.267
490 0.306
495 0.281
500 0.227

Hideo Fujii

USA
1582 Posts

Posted - 07/25/2011 :  2:07:00 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi xuwenyu,

It seems you have assigned the values of dependent variable(y) as complex.
If I understood correctly from the tutorial you mentioned, you have to
get the values as real from the complex result such that:

complex cc = (1i*(m^2-1)*tan(pi ..... ;
y = cc.m_re;

I hope I understood correctly.

--Hideo Fujii
OriginLab

Edited by - Hideo Fujii on 07/25/2011 2:07:38 PM
Go to Top of Page

xuwenyu

China
2 Posts

Posted - 07/27/2011 :  9:29:11 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thanks Hideo Fujii, problem resolved.
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