[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Multiplication of empty matrices?
From: |
Rik |
Subject: |
Multiplication of empty matrices? |
Date: |
Tue, 09 Jun 2015 10:59:18 -0700 |
6/9/15
All,
I came across this odd behavior for the multiplication of empty matrices:
octave:1> x = zeros (0,1)
x = [](0x1)
octave:2> y = zeros (1,0)
y = [](1x0)
octave:3> x * y
ans = [](0x0)
octave:4> x .* y
error: product: nonconformant arguments (op1 is 0x1, op2 is 1x0)
octave:4> x * y'
error: operator *: nonconformant arguments (op1 is 0x1, op2 is 0x1)
magic(3) * x
error: operator *: nonconformant arguments (op1 is 3x3, op2 is 0x1)
Is this what Matlab does? I would think that an empty matrix multiplying
anything would return the empty matrix.
--Rik
- Multiplication of empty matrices?,
Rik <=