|
22111967
Czech Republic
Posts |
Posted - 04/24/2008 : 10:33:42 AM
|
Origin Version (Select Help-->About Origin): 7.5 Operating System:XP
This procedure:
double to_degr( double x ) { double pix = 3.1415926; return x / pix * 180; }
void prevod2() { Worksheet wks = Project.ActiveLayer(); Dataset a, b, c, d, e, f, g, h;
a.Attach(wks, 0); b.Attach(wks, 1); c.Attach(wks, 2); d.Attach(wks, 3); e.Attach(wks, 4); f.Attach(wks, 5); g.Attach(wks, 6); h.Attach(wks, 7);
unsigned int pocet_riadkov = a.GetSize(); double sucet = 0; double pix = 3.1415926;
for( unsigned int i = 0; i < pocet_riadkov ; i++ ) {
double tmp = atan( abs( b[i] / a[i] ) ); if ( (a[ i ] > 0) && (b[ i ] > 0) ) { e[ i ] = tmp; } if ( (a[ i ] < 0) && (b[ i ] > 0 )) { e[ i ] = pix - tmp; } if ( (a[ i ] < 0) && (b[ i ] < 0 )) { e[ i ] = - pix + tmp; } if ( (a[ i ] > 0) && (b[ i ] < 0 )) { e[ i ] = - tmp; }
d[i] = sqrt( a[i]*a[i] + b[i]*b[i] ); f[i] = to_degr( e[i] ); }
printf("fin!\n"); }
working up to [i] = 9957 and after turn off with "Error: Failed to execute script" Number of rows is 40 000.
You have some idea, please ??
jan
|
|