 License Public Domain
 Lines 40
matrices (2)
##### Related Eigenvectors and Eigenvalues Finding Epsilon Fixed Point Iteration The Newton-Raphson Method Find GIS Files that Overlap Extents / Find Extents of GIS File
##### Permissions Owner: David Isaacson Viewable by Everyone Editable by All Siafoo Users

# Euclidian Norm 0

 In Brief Finds the euclidian norm of a matrix you specify.
 Language C
# 's
` 1/* Programmed by David Isaacson, 2003 2 * Released into the Public Domain 3 * 4 * euclidiannorm.c 5 * 6 * This program will find the euclidian norm of a matrix A 7 */ 8 9#include<stdio.h>10#include<math.h>1112int main()13{14	int i,j;		//counters15	int columns,rows;	//columns and rows of A16	double value;		//value of A(i,j)17	double sum=0;		//sum of the squares18	double norm;		//just what it looks like19	20	printf("This program will find the Euclidian Norm of a matrix you specify.\n");21	printf("How many rows are in the matrix? ");22	scanf("%i",&rows);23	printf("How many columns? ");24	scanf("%i",&columns);2526	//time to input A - we don't need to bother remembering the values, though27	for(i=1;i<=rows;i++)28	{29		for(j=1;j<=columns;j++)30		{31			printf("What is the value at %i,%i? ",i,j);32			scanf("%lf",&value);33			sum+=value*value;	//adding the square of the value34						//to the total sum35		}36	}37	//now we have the sum of all the squares38	39	norm=sqrt(sum);		//duh4041	printf("The euclidian norm of your matrix is: %lf\n",norm);42	43	return 0;44}`

Finds the euclidian norm of a matrix you specify.