Re: [eigen] casting real array to a segement of complex array

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]


I think

snr1dft..segment(iminf,imaxf-iminf+1)=snr1.cast<std::complex<double> >( );

should work, provided the two array lengths are the same.

-- Trevor



On 16 May 2012 15:35, Fitzpatrick, Denis F <Denis.Fitzpatrick@xxxxxxxxxxxx> wrote:

The following:

 

snr1dft.segment(iminf,imaxf-iminf+1)=snr1;

 

where snr1dft is ArrayXcd and snr1 is ArrayXd gives

 

YOU_MIXED_DIFFERENT_NUMERIC_TYPES__YOU_NEED_TO_USE_THE_CAST_METHOD_OF_MATRIXBASE_TO_CAST_NUMERIC_TYPES_EXPLICITLY

 

How can I make this work?

 

Denis Fitzpatrick

 

Boys Town National Research Hospital

(402) 498-6378

denis.fitzpatrick@xxxxxxxxxxxx

 




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/