You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In matlab/octave, I can define a m x n matrix (3 x 5 in this case) and multiply it by a n x 1 column vector (5 x 1 in this case). It yields a 3x1 column vector:
X = [11111; 22222; 33333]
X =11 1 1 122 2 2 233 3 3 3octave:427>w= [1;2;3;4;5]
w =12345octave:428>X*w
ans =153045
However, ghostjat cannot multiply a 3 x 5 matrix times a vector with size=5:
require__DIR__ . '/np/vendor/autoload.php';
useNp\matrix;
useNp\vector;
$x = Np\matrix::ar([
[1,1,1,1,1],
[2,2,2,2,2],
[3,3,3,3,3]
]);
$w = Np\vector::ar([1, 2, 3, 4, 5]);
$p = $x->dot($w); // throws exception Mismatch Dimensions of given Objects! Obj-A col & Obj-B row amount need to be the same!$p = $x->multiply($w); // throws exception Mismatch Dimensions of given Objects! Obj-A col & Obj-B row amount need to be the same!
The text was updated successfully, but these errors were encountered:
In matlab/octave, I can define a m x n matrix (3 x 5 in this case) and multiply it by a n x 1 column vector (5 x 1 in this case). It yields a 3x1 column vector:
However, ghostjat cannot multiply a 3 x 5 matrix times a vector with size=5:
The text was updated successfully, but these errors were encountered: