forked from freudenreichan/info2Praktikum-NeuronalesNetz
matrixErstellen bearbeitet und struct korrigiert
This commit is contained in:
1 parent
355fd11e2a
commit
2761ee453a
2 files changed
+16
-1
No files matched your search
@@ -6,11 +6,23 @@
|
||||
|
||||
Matrix createMatrix(unsigned int rows, unsigned int cols)
|
||||
{
|
||||
Matrix matrix;
|
||||
|
||||
matrix.anzahlSpalten = cols;
|
||||
matrix.anzahlZeilen = rows;
|
||||
|
||||
matrix.buffer = mallloc(cols*rows*(sizeof(Matrix)));
|
||||
|
||||
return matrix;
|
||||
|
||||
}
|
||||
|
||||
void clearMatrix(Matrix *matrix)
|
||||
{
|
||||
free(matrix->buffer);
|
||||
|
||||
matrix->buffer = NULL;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user