Hi Lenneke,
I do not know what your meaning of multiply two datasets.
But for how to manipulate the elements of the datasets, you can see the following example, which adds x and y of the two datasets respectively and stored in a new dataset.
void ManipulateDataset()
{
Dataset dsAX("data1_a"), dsAY("data1_b");//data1 is the name of workbook for the first dataset, column A as x and column B as Y.
Dataset dsBX("data2_a"), dsBY("data2_b");//data2 is the name of workbook for the second dataset, column A as x and column B as Y.
Dataset dsCX("data3_a"), dsCY("data3_b");//data3 is the name of workbook for the results
int nSize = dsAX.GetSize()> dsBX.GetSize()? dsBX.GetSize(): dsAX.GetSize();
dsCX.SetSize(nSize);//Set the size of data3 as the min of data1 and data2
dsCY.SetSize(nSize);
//here is to show how to access each element of the dataset,
//in fact, you can simply use
//dsCX = dsAX + dsBX;
// to add two columns.
for(int ii = 0; ii<nSize; ii++)
{
dsCX[ii] = dsAX[ii] + dsBX[ii];// x3 = x1 + x2;
dsCY[ii] = dsAY[ii] + dsBY[ii];// y3 = y1 + y2;
}
}
For more information about dataset, please reference to Help > Programming > Origin C Language Reference > Classes > Dataset, vector and vectorbase. There are many detailed examples you can learned from.
Zachary
OriginLab GZ Office