C Program to Find norm of matrix: Norm a matrix is defined as squareroot of the sum of the squares of the elements of a matrix

Leave a Comment


# include
# include

# define row 10
# define col 10

int i, j;
float summation;

void display( float mat[row][col], int, int);
void input(float mat[row][col] ,int, int);
float norm_mat(float mat[row][col], int, int);

void display(float mat[row][col] ,int row1, int col1)
{
	for(i = 0; i < row1; i++)
	{
		for(j = 0; j < col1; j++)
		{
			printf("  %f", mat[i][j]);
		}
		printf("\n");
	}
}

/* Input function */

void input(float mat[row][col] ,int row1, int col1)
{
	for(i = 0 ; i< row1; i++)
	{
		for(j = 0 ;  j

0 comments:

Post a Comment