24 lines
452 B
C
24 lines
452 B
C
|
#include <stdio.h>
|
||
|
|
||
|
#include "clm.h"
|
||
|
|
||
|
int main() {
|
||
|
clm_Matrix mat = clm_createMatrixRandom(2, 1);
|
||
|
clm_matrixPrint(mat);
|
||
|
|
||
|
mat = clm_matrixTranspose(mat);
|
||
|
clm_matrixPrint(mat);
|
||
|
|
||
|
mat = clm_matrixAddScalar(mat, 1);
|
||
|
clm_matrixPrint(mat);
|
||
|
|
||
|
clm_Matrix b = clm_createMatrixRandom(2, 2);
|
||
|
clm_matrixPrint(b);
|
||
|
|
||
|
clm_Matrix mul = clm_matrixMultiplyMatrix(mat, b);
|
||
|
clm_matrixPrint(mul);
|
||
|
|
||
|
mul = clm_matrixMultiplyScalar(mul, 0.5);
|
||
|
clm_matrixPrint(mul);
|
||
|
}
|