Matric and C
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Matric and C相关的知识,希望对你有一定的参考价值。
Definition
https://www.mathsisfun.com/algebra/matrix-introduction.html
How to do Multiplication
https://www.mathsisfun.com/algebra/matrix-multiplying.html
Online calculator
http://matrix.reshish.com/multCalculation.php
C implementation
/* Multiplying matrix a and b and storing in array mult. */ for(i=0; i<r1; ++i) for(j=0; j<c2; ++j) for(k=0; k<c1; ++k) { mult[i][j]+=a[i][k]*b[k][j]; }
/*mat(r*c) *mat(r),v will have k rows,1 column
for(i=0;i<k;i++)
for(j=0;j<k;j++)
v[i]+=mat[i][j]*v2[j];
*/
/*v1 has k columns and 1 row,v has 1 coumn,k rows,result will have one
row,one column,so only using a variable to store is ok
for(i=0;i<k;i++)
result=result+v1[i]*v[i];
*/
以上是关于Matric and C的主要内容,如果未能解决你的问题,请参考以下文章
am335x system upgrade rootfs for dhcpcd cross compile(十三)
SQLSTATE [23000]:完整性约束违规:1048 laravel 5.7