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
 Curve differentiation problems

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
evanm Posted - 05/27/2004 : 08:23:12 AM
Hello,
I think I have a really strange and unique problem here. I want to read a curve from a worksheet using Origin C and then differentiate it using "Curve_derivative". This works just fine when I create the worksheet by importing from an ASCII file or open the worksheet, but it never works at all when I create a worksheet from an opened graph. it doesn't even work if I save the worksheet that was created from the graph and then reopen it. I think there must be something different internally in the way Origin manages the data. This is a huge problem because I often transfer graphs and then open them elsewhere and view its corresponding worksheet. Has anyone heard of this happening? By the way I am using Origin 7.
Thank you, Evan Morris.
5   L A T E S T    R E P L I E S    (Newest First)
evanm Posted - 06/01/2004 : 08:59:07 AM
Thanks Mike, that's exactly what I could have used. I was getting the return value 63 but I didn't know what it meant. Evan.
Mike Posted - 05/27/2004 : 2:31:29 PM
Evan, I did a bit of checking and the OriginC Help file in earlier Origin 7 builds was lacking the info that I posted above. So make sure that you are using SR4 and be sure to get the latest version 7 Help files (http://www.originlab.com/index.aspx?s=12&lm=+66).

Mike
OriginLab
Mike Posted - 05/27/2004 : 2:20:21 PM
Evan, I looked to see what the Origin 7 Help file (the Origin C Language Reference) had to say about Curve_bspline and Curve_derivative. Both list the following return values:

quote:
Returns zero on successful exit and a non-zero error code on failure.
Errors:
-1=System can not allocate enough memeory
-2=Curve data type error
-4=The result curve range can not be set
5=The smoothness parameter must be equal to or greater than 0
11=The number of data points is less than 4
63=The sequence of X in source data is not increasing
73=Memory allocation failed
240=The weights are not all positive
254=The smoothness parameter is too small


I hope this helps, but it sounds as though you may have worked this through.

Mike
OriginLab
evanm Posted - 05/27/2004 : 11:09:35 AM
Opps....please disregard this thread. My "problem" is no where near what I thought and Origin does not have some wierd perk to it. My problem was simply that Curve_bspline and Curve_derivative require Curves that are sorted with increasing X, I had decreasing. This was not in the documentation (help) files, but since I am using an older version (7) it has probebly changed without me knowing. Evan.
evanm Posted - 05/27/2004 : 08:27:44 AM
To add to that, for any curve I create from the graph-created-worksheet, I can view and change the data using the square brackets curve[i]. The problem is that Curve_derivative DOES NOT change the data in the pResults curve that I pass the function. It does however change the passed results curve for a curve created fom a "good" worksheet.

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