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 for Programming
 Forum for Origin C
 Access orig. dataset from within fitting 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

bartrex

Russia
3 Posts

Posted - 12/10/2024 :  3:41:03 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hello,
I want to access downloaded dataset from user-defined fitting function (origin c), but I didn't find anything exept direct access as an worksheet object. It doesn't seems to me a very good solution because in this situation I have to refer to worksheet name or it should be active layer. I think it must be a special notation for datasets specified in Nonlinear Curve Fit Tool. Could you please explain how I can do this or send me to the documentation where I can find the answer.
Thanks in advance.

Edited by - bartrex on 12/18/2024 11:10:44 AM

YimingChen

1638 Posts

Posted - 12/11/2024 :  1:56:44 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Are you talking about performing curve fitting using OriginC code and obtaining the fitted curve? If so, please refer to the following pages for the function to use and the sample code. Thank you.
https://www.originlab.com/doc/OriginC/ref/NLFitSession-GetYFromX
https://www.originlab.com/doc/OriginC/ref/NLFitSession

James
Go to Top of Page

bartrex

Russia
3 Posts

Posted - 12/15/2024 :  2:34:53 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thank you for your reply, James!
Perhaps I didn't express the question in enough detail. This is almost what I wanted except for one detail. I want to get dataset for which fitting is performed (experimental curve), not fitted curve. Unfortunately I didn't find this function in docs section you sent.
In origin c script experimental curve is determined clearly by the user. But usually I perform fitting using Nonlinear Curve Fit Tool. And I want to be able to access it from within the fitting function. Initially I thought that experimantal data would be contained in dependent variables and only later I should redefine it but there are zeros instead.
Maybe there is no functionality to do what I want and I should use only worksheet object. I'm just not sure. Thank you.
Go to Top of Page

YimingChen

1638 Posts

Posted - 12/16/2024 :  4:24:32 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
If you're referring to obtaining the original data from the NLFitSession object, it isn't possible, as the dataset member in the class is private and not accessible.

Go to Top of Page

bartrex

Russia
3 Posts

Posted - 12/17/2024 :  11:39:55 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Yes, this is exactly what I meant.
This is unfortunate, since in my function the fitting is done by solving a system of equations that is obtained numerically. And I expect better performance when using original data as initial values for solver.
Anyway thank you a lot for your reply!
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