Reputation: 115
I have two matrices A and B, where A & B contains some real numbers. Now I want a complex numbered matrix C, such that: C[0] = A[0] + i B[0].
My question is how create such complex matrix C, and how to pass A, B matrices values into matrix C.
I came to know that, I can create matrix C as follows:
CvMat* C_Matrix = cvCreateMat(5, 5, CV_64FC2);
But now how to pass values of A & B to matrix C_Matrix?
Upvotes: 2
Views: 4893
Reputation: 52646
I think you can use merge()
function here, See the Documentation
It says : Composes a multi-channel array from several single-channel arrays.
Upvotes: 2