mattr.c 517 B

123456789101112131415161718
  1. /* mattr.c CCMATH mathematics library source code.
  2. *
  3. * Copyright (C) 2000 Daniel A. Atkinson All rights reserved.
  4. * This code may be redistributed under the terms of the GNU library
  5. * public license (LGPL). ( See the lgpl.license file for details.)
  6. * ------------------------------------------------------------------------
  7. */
  8. void mattr(double *a, double *b, int m, int n)
  9. {
  10. double *p;
  11. int i, j;
  12. for (i = 0; i < n; ++i, ++b)
  13. for (j = 0, p = b; j < m; ++j, p += n)
  14. *a++ = *p;
  15. }