diff --git a/matrix.c b/matrix.c index ad00628..4ed32c9 100644 --- a/matrix.c +++ b/matrix.c @@ -6,7 +6,11 @@ Matrix createMatrix(unsigned int rows, unsigned int cols) { - + Matrix matrix; + matrix.rows = rows; + matrix.cols = cols; + matrix.buffer = (float*) calloc(rows * cols, sizeof(float)); + return matrix; } void clearMatrix(Matrix *matrix)