#include <stdio.h>
#include "matfuncs.h"

void
usage(char *argv0)
{
	printf("usage:\t%s n\t-- nxn identity matrix\n"
		"\t%s m n\t--mxn identity matrix (whatever that is)\n",argv0,argv0);
	exit(1);
}

int
main(int argc, char **argv)
{
	unsigned long rows, cols;
	mat *I;

	switch(argc) {
		case 2:
			rows = cols = atol(argv[1]);
			break;
		case 3:
			rows = atol(argv[1]);
			cols = atol(argv[2]);
			break;
		default:
			usage(argv[0]);
			break;
	}
	I = m_identity(rows, cols);
	if (!I)
		fprintf(stderr,"No matrix?!\n");
	else
		m_print(I);
	exit(0);
}
