This commit is contained in:
Bora Zuenbuelkoek 2025-05-30 08:27:43 +02:00
parent ae3b8a086e
commit 6eb4e0e658
2 changed files with 3 additions and 12 deletions

View File

@ -46,4 +46,6 @@ int main() {
FreeMatrix(f);
return 0;
}
}
//gcc TestMatricOp.c -L. -lmatrixOp -o TestMatricOp

View File

@ -15,17 +15,6 @@ Matrix* CreateMatrixZero(int rows, int cols) {
return m;
}
// Erstellt eine Matrix mit Zufallswerten zwischen -100 und 99
Matrix* CreateMatrixRand(int rows, int cols) {
srand(time(NULL)); // Initialisiert Zufallszahlengenerator
Matrix *m = CreateMatrixZero(rows, cols);
for (int i = 0; i < rows; i++) {
for (int j = 0; j < cols; j++) {
m->data[i][j] = (rand() % 200 - 100) / 1.0; // Werte von -100 bis 99
}
}
return m;
}
// Erstellt eine Matrix, deren Einträge mit startValue beginnen und dann hochzählen
Matrix* CreateMatrix(int rows, int cols, double startValue) {