T O P I C R E V I E W |
ahlers01 |
Posted - 05/31/2010 : 4:01:28 PM Origin Ver. 8.0 and Service Release 5 Operating System: Win XP Prof.
Again an OriginC-beginner's question:
When I want to manipulate data in a worksheet: is there a rule when it's better to use the Dataset class or the Datarange class?
Or is this an irrelevant question because I do not understand the classes?
|
2 L A T E S T R E P L I E S (Newest First) |
cpyang |
Posted - 06/01/2010 : 5:01:11 PM Please be careful when using Dataset and passing it to external DLL like NAG. Dataset maps a column in a worksheet to a vector, without making a copy. By default, worksheet columns are Text & Numeric, so you cannot get a pointer to array of double from it, and if you need to pass it as a reference to a vector or to pass it to external DLL, you need to make a copy into a vector first.
CP
|
Penn |
Posted - 05/31/2010 : 11:01:53 PM Hi,
Dataset can be used as a vector, but DataRange can not. DataRange is a combination of full or partial Datasets, that is DataRange can be a column, multiple columns, a block of worksheet, multiple blocks of worksheet, but Dataset can only be a column. From this point, DataRange is more powerful than Dataset, especially when making a plot. A DataRange can hold the X, Y, Z and Error columns together. DataRange is recommended.
You can refer to some examples in this page.
Penn |
|
|