Archangelpl

Untitled

Jun 18th, 2018
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. if (wyniki3.is_open() && wyniki4.is_open())
  2. {
  3. double **x, **y;
  4. x = proj.getCrankLU();
  5. y = proj.getCrankGS();
  6. double *ptrX, *ptrY;
  7. double **an;
  8. an = proj.getAnal();
  9.  
  10. double errLU;
  11. double errgs;
  12. double max1;
  13. double max2;
  14.  
  15. for (int j = 0; j < N; j++)
  16. {
  17. max1 = 0.0;
  18. max2 = 0.0;
  19. ptrX = x[j];
  20. ptrY = y[j];
  21.  
  22. for (int i = 0; i< M; i++)
  23. {
  24. errLU = ptrX[i] - an[j][i];
  25. errLU = fabs(errLU);
  26. if (errLU> max1)
  27. max1 = errLU;
  28.  
  29. errgs = ptrY[i] - an[j][i];
  30. errgs = fabs(errgs);
  31. if (errgs> max2)
  32. max2 = errgs;
  33. }
  34. wyniki3 << log10(h*j) << " " << log10(max1) << endl;
  35. wyniki4 << log10(h*j) << " " << log10(max2) << endl;
  36. }
  37. wyniki3.close();
  38. wyniki4.close();
  39.  
  40. }
Add Comment
Please, Sign In to add comment