Dear IT++ developers,
The output from the matlab function toeplitz(column_vector, row_vector)
toeplitz([1+i, 2+2*i], [3+3i, 4+4i])
1.0000 + 1.0000i 4.0000 + 4.0000i
2.0000 + 2.0000i 1.0000 + 1.0000i
that is, the toeplitz matrix is constructed directly from the column and row vectors.
The IT++ version itpp::toeplitz pre-processes the column vector in a special way: it takes the conjugate of all but the first element of the column vector before constructing the toeplitz matrix, which gives the result:
produced by the following test code:
cvec column_vector("1+1i 2+2i");
cvec row_vector("3+3i 4+4i");
cmat toeplitz_matrix = toeplitz(column_vector, row_vector);
cout << toeplitz_matrix << endl;
Is this difference between the matlab and IT++ versions intentional? If so, it might be a good idea to stress this in the function documentation, and maybe even add this to the "Conversion table between IT++ syntax and Matlab/Octave" in the tutorials.
Log in to post a comment.