Am 10.01.2020 um 09:56 schrieb Ioannis A. Venetis:
I understand 'Data types not conformable for operation' but
could it be
that if A was a real matrix then Re(A) = A and Im(A) = zeros(.,.) ?
I do not know how difficult that might be.
Maybe as a workaround you could use these wrappers:
function matrix alwaysRe(const matrix m)
return iscomplex(m) ? Re(m) : m
function matrix alwaysIm(const matrix m)
return iscomplex(m) ? Im(m) : m
I've also noticed that sqrt still doesn't work on matrices with negative
numbers. Of course not strictly necessary, but since the root of -1 is
the definition of i, feels a little strange.