comparison liboctave/dMatrix.cc @ 12065:899122410ea5 release-3-2-x

more fixes & tests for matrix multiply
author Jaroslav Hajek <highegg@gmail.com>
date Sun, 23 Aug 2009 11:11:27 +0200
parents a9d20c890190
children
comparison
equal deleted inserted replaced
12064:8e8da2c36e7e 12065:899122410ea5
3157 %!shared M, cv, rv 3157 %!shared M, cv, rv
3158 %! M = randn(10,10); 3158 %! M = randn(10,10);
3159 %! cv = randn(10,1); 3159 %! cv = randn(10,1);
3160 %! rv = randn(1,10); 3160 %! rv = randn(1,10);
3161 %!assert([M*cv,M*cv],M*[cv,cv],1e-14) 3161 %!assert([M*cv,M*cv],M*[cv,cv],1e-14)
3162 %!assert([M'*cv,M'*cv],M'*[cv,cv],1e-14)
3162 %!assert([rv*M;rv*M],[rv;rv]*M,1e-14) 3163 %!assert([rv*M;rv*M],[rv;rv]*M,1e-14)
3164 %!assert([rv*M';rv*M'],[rv;rv]*M',1e-14)
3163 %!assert(2*rv*cv,[rv,rv]*[cv;cv],1e-14) 3165 %!assert(2*rv*cv,[rv,rv]*[cv;cv],1e-14)
3164 */ 3166 */
3165 3167
3166 static const char * 3168 static const char *
3167 get_blas_trans_arg (bool trans) 3169 get_blas_trans_arg (bool trans)