static char *sccsid = "@(#)m_copy.c	4/5/82 (U of Maryland, FLB)";

#include "mat.h"

struct matrix *
m_copy(mat)
register struct matrix *mat;
{
register struct matrix *result;
register int row, col;

m_create(result, mat->m_rows, mat->m_cols);

for (row = 0; row < mat->m_rows; row++)
	for (col = 0; col < mat->m_cols; col++)
		m_v(result, row, col) = m_v(mat, row, col);

return(result);
}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      