45 double **soucin(
int m,
int n,
int o,
double **A,
double **B) {
48 double **C = (
double **)malloc(m *
sizeof(
double*));
49 for (i=0; i < m; i++) {
50 C[i] = (
double*)malloc(o *
sizeof(
double));
51 for (j=0; j < o; j++) {
52 for (p=0, Cij=0.0; p < n; p++) {
54 Cij += A[i][p] * B[p][j];
63 void vypis_matice(
int m,
int n,
double **A) {
67 printf(
"%s%g", j?
", ":
"", A[i][j]);
74 double A23[2][3] = { {1,2,3}, {4,5,6}};
75 double B32[3][2] = { {1,0}, {2,1}, {0, -1}};
78 double *A[2] = {&A23[0][0], &A23[1][0]};
79 double *B[3] = {&B32[0][0], &B32[1][0], &B32[2][0]};
85 C = soucin(2,3,2, A, B);