Hello,
1)How to allocate memory dynamically for 2D array in Origin, i get "general compiler error"?
2)How to paste elements of array to a new worksheet with OriginC?
3)Is it possible to write a part of code in labTalk and use it in *.cpp file?
void DefaultSmooth() {
Worksheet wks = Project.ActiveLayer();
if(!wks) {
out_str("no acitve workbook window to import data");
return;
}
int RowNo = wks.GetNumRows();
int daliklis=1;
int n,m;
//double m2,m1,m,p1,p2,tarp,diff;
//memory allocation for arrays
double v1=-70000000, v2=70000000;
double * Gpoints, Bpoints, Fpoints;
Gpoints=(double *)malloc(v1*v2*sizeof(double));
Bpoints=(double *)malloc(v1*v2*sizeof(double));
Fpoints=(double *)malloc(v1*v2*sizeof(double));
for(m=0;m<RowNo;m++){
for(n=0;n<2;n++){
//printf("Enter array elements:");
Gpoints[n][m])=0;
Bpoints[n][m])=0;
Fpoints[n][m])=0;
}
}
//some code for data manipulation,
//how to pasta data from final array Fpoints to the worksheet?
}