From 97a693d996c79fb2a008b19750d8bb45512e01a2 Mon Sep 17 00:00:00 2001 From: Alexander Pickering Date: Mon, 6 Feb 2017 11:26:44 -0500 Subject: Inital commit --- matrixv.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 matrixv.c (limited to 'matrixv.c') diff --git a/matrixv.c b/matrixv.c new file mode 100644 index 0000000..0b1ea3a --- /dev/null +++ b/matrixv.c @@ -0,0 +1,30 @@ +/* File: matrixv.c + Calculate matrix equation b = Ax */ + +#include + +#define M 3 +#define N 3 + +int main() +{ + double a[M][N] = {{ 3,5,6}, + { 4,2,1}, + { 0,7,1}}; + double v[N] = {2,1,-2}; + double b[M]; + + int i,j; + + for(i = 0;i