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
 Sorting an XY DATASET in originC
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

dharmarasu2

Japan
3 Posts

Posted - 03/10/2004 :  01:14:05 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hello,



Is there a possible way out to sort XY columns in OriginC?

For example, I have two datasets ds1, ds2 holding the data.



I want to duplicate the datasets and the duplicated datasets must be sorted in ascending order.



I tried with the following code:



Dataset ds1("Data1_A"), ds2("Data1_B");

Dataset dds1(ds1), dds2(ds2);





Curve crv;

crv.Attach(dds1, dds2);

crv.Sort(); //sort the X and Y axis



But I am not successful. Looking forward a possible work around .



Thanks in Advance,

Dharma

cpyang

USA
1406 Posts

Posted - 03/10/2004 :  6:59:02 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Maybe your Curve was not constructed correctly, try

Worksheet wks("data1");

Curve crv(wks, 0, 1);

crv.Sort();



CP


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