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 for Programming
 Forum for Origin C
 NLSF make curve question

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
artem Posted - 11/29/2007 : 01:12:22 AM
Origin Version (Select Help-->About Origin): Origin 7.5 SR 5
Operating System: windows vista

Hi,


I am a beginner of orgin C and trying to calculate a dataset from NLSF using nlsf.makecurve. Some how after I run the program, I got nothing other than a new graph layer. ( I have a new blank worksheet layer before I run the code.) Any advice/help is welcome. Many thanks.

Below is the small program I wrote:

void nlsf_test()
{
using nlsf = LabTalk.NLSF; // define nlsf
nlsf.func$ = "Gauss"; // select fitting function
nlsf.p1 = 1; //initialize parameter values//p1 is c, p2 is q, p3 is p(ower), p4 is F1, p5 is ig//
nlsf.p2 = 1;
nlsf.p3 = 1;
nlsf.p4 = 1;
//nlsf.p5 = 0;

nlsf.makecurve("func");
nlsf.xbegin = 0.5;
nlsf.xstep = 0.5;
nlsf.xend = 20;
nlsf.xmode = 5;

nlsf.funcx$ = "data1_a";
nlsf.funccol$ = "data1_b";

}



Edited by - artem on 11/29/2007 01:21:36 AM
2   L A T E S T    R E P L I E S    (Newest First)
artem Posted - 11/30/2007 : 01:18:41 AM
Thank you very much, Mike. I emailed their tech support this moring and got their reply late this afternoon. They said the same thing. Thank you very much for your support.

Mike Buess Posted - 11/29/2007 : 4:50:46 PM
First, you should wait until its parameters (nlsf.xbegin, nlsf.funccol$, etc.) have been defined before you execute nlsf.makecurve(). Second, using makecurve with xmode=4 or 5 can yield unpredictable results. I find that it's more reliable to use xmode=2 and create the X values myself...

Dataset ds("Data1_A"); // declare column A as dataset
ds.Data(0.5,20,0.5); // create X values
nlsf.xmode = 2;
nlsf.funcx$ = "data1_a";
nlsf.funccol$ = "data1_b";
nlsf.makecurve("func");

Mike Buess
Origin WebRing Member

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