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
 independend dataset for calculation
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

mkoetse

Netherlands
Posts

Posted - 01/19/2004 :  08:30:36 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hello all,

I have the next bit of code:

---
Worksheet wks(strWks);
int rown = GetRownVon(strWks);
Dataset dsV(wks,0);
Curve cvEcd(wks,5); // is Ecd
Curve cvElm(wks,6); // is Elm
int datsize = dsV.GetSize();
cvEcd.SetLowerBound(rown);
cvElm.SetLowerBound(rown);
cvEcd.SetUpperBound(datsize-2*rown);
cvElm.SetUpperBound(datsize-2*rown);
double maxCd = xatymax(cvEcd);
double maxLm = xatymax(cvElm);
---
This works fine, but is there a simple way to get a range of the curve, without using Set Lower and Upperbound? I'd like to plot the whole curve and do the math on only a part of the data.

Regards,

Marc


cpyang

USA
1406 Posts

Posted - 01/19/2004 :  10:02:40 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
To use a range of a plotted curve, the best thing to do is a use a copy constructor, see http://www.originlab.com/forum/topic.asp?TOPIC_ID=2784 where I have posted sample codes.


CP


Go to Top of Page

mkoetse

Netherlands
Posts

Posted - 01/19/2004 :  11:49:30 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thanx,

Exactly what I was looking for! But, could it be that this way of use of the Curve object is only constructed in version 7.5? (because I get constructor errors after trying to build.)
If so is there a version 7(SR4) work around?

Marc





Edited by - mkoetse on 01/19/2004 2:40:47 PM
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