/* tsmgen.c CCMATH mathematics library source code. * * Copyright (C) 2000 Daniel A. Atkinson All rights reserved. * This code may be redistributed under the terms of the GNU library * public license (LGPL). ( See the lgpl.license file for details.) * ------------------------------------------------------------------------ */ /* Test: smgen ortho Uses: matprt Input parameter: n -> size of matrix is n by n */ #include "ccmath.h" unsigned int seed=123456789; void main(int na,char **av) { double *sm,*om,*p; int i,j,n; double *e,s; if(na!=2){ printf("para: size\n"); exit(1);} n=atoi(*++av); sm=(double *)calloc(n*n,sizeof(double)); om=(double *)calloc(n*n,sizeof(double)); e=(double *)calloc(n,sizeof(double)); /* initialize real eigenvalues */ for(i=0,s=1.; i