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
 ChiSquare Surface Problem

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
rhparker Posted - 01/16/2015 : 12:11:24 PM
Origin Ver. and Service Release (Select Help-->About Origin): Origin 9.0.0 SR2 b87
Operating System: Windows 7 64-bit

Hi all,
I'm not new to Origin, but I'm new to using Origin C. I'm trying to get Origin to generate a chisquare surface for some data I have. I found this example, but I can't get the example to run:
http://www.originlab.com/doc/OriginC/examples/ChiSquare-Space
Here's what I'm doing, step-by-step:
Open Origin 9.
Open Code Window.
Make new C file called chisquare_space.
Paste the source code for chiSqrSurf from that example after the "start your function here" line.
Save the file.
Go back to the main Origin window, open up the command window.
Paste in "run.LoadOC(Originlab\nlsf_utils.c);". There's no error message, so I guess that means it worked okay.
Go back to the code window. Click the build button. It returns:
compiling...
chisquare_space.c
Linking...
Done!
Then I make a new C file, named chiSqrSurf_ex1.
Paste the code for chiSqrSurf_ex1 from that example into this second C file.
Click the build button. This time I get three error messages:
compiling...
chiSqrSurf_ex1.c
D:\Users\Richard\Documents\OriginLab\90\User Files\OriginC\chiSqrSurf_ex1.c(55) :Error, Variable "NLFitSession FitSession" not declared
D:\Users\Richard\Documents\OriginLab\90\User Files\OriginC\chiSqrSurf_ex1.c(55) :Error, general compile error
D:\Users\Richard\Documents\OriginLab\90\User Files\OriginC\chiSqrSurf_ex1.c(32) :Error, error(s) found in compiling function chiSqrSurf_ex1

Compiling errors found, linking cannot start!

Does anyone know how to get this example program to run?

I did find an old topic on this forum about this issue, http://www.originlab.com/forum/topic.asp?TOPIC_ID=9597. The problem was eventually solved, unfortunately the link to the code that solved the problem no longer works. :(

Thanks to anyone who can help!


3   L A T E S T    R E P L I E S    (Newest First)
michelleronald Posted - 01/23/2015 : 06:05:20 AM
Thanks (Castiel) for the new line.

rhparker Posted - 01/18/2015 : 10:41:54 AM
Wow, thanks! Those new lines of code made it work, and I can take it from here. Thanks again!
Castiel Posted - 01/17/2015 : 08:56:18 AM
Add the following 2 lines at the beginning of chiSqrSurf_ex1.c, after #include <Origin.h>:

#include <..\originlab\NLFitSession.h>
extern BOOL chiSqrSurf(const vector& vX, const vector& vY, const vector& vParams, double dXFrom, double dXTo, int nXNumSteps, double dYFrom, double dYTo, int nYNumSteps, string strFunc = "Poly", int nVaryParamX = 0, int nVaryParamY = 1);


©c¡Ï   ¤È¥¹  ©f¨u©c  ©c¥ì    ¥Î¤³  ©c/     ©¦£¯
 ©c¨Ê¥Î ¤´¥¨  ¥ó ¨×   ¥ó¤á' ¥Ì©¦¥­   /¤í  ¥Õ©¦©f
   ¨Ö             ¦á          ©¦£þ  ©` ¥Õ   ©¦
                              ©¦

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