generated from freudenreichan/info2Praktikum-NeuronalesNetz
Added CreateMatrix Function
This commit is contained in:
parent
ebc5ff0216
commit
44b77815b3
5
matrix.c
5
matrix.c
@ -13,7 +13,10 @@ typedef struct Matrix {
|
|||||||
|
|
||||||
Matrix createMatrix(unsigned int rows, unsigned int cols)
|
Matrix createMatrix(unsigned int rows, unsigned int cols)
|
||||||
{
|
{
|
||||||
|
Matrix newMatrix;
|
||||||
|
newMatrix.rows = rows;
|
||||||
|
newMatrix.cols = cols;
|
||||||
|
newMatrix.buffer = calloc(rows*cols, sizeof(MatrixType))
|
||||||
}
|
}
|
||||||
|
|
||||||
void clearMatrix(Matrix *matrix)
|
void clearMatrix(Matrix *matrix)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user