Re: [ojAlgo-user] how to manipulate complex matrix
Mathematics, linear algebra and optimisation
Brought to you by:
apete
From: Anders P. <an...@op...> - 2015-11-06 12:22:44
|
I wrote those utilities for you - they’re already checked in. If you wait a few days there will be a new snapshot release at SourceForge, and not too far away (I think) v39 will be released. /Anders > On 6 nov. 2015, at 12:37, applyhhj <app...@16...> wrote: > > Thank you very much for your kind response. I will consider this approach. By the way, if there is any method that can retrieve the real and imaginary part of a complex matrix to seperate primitive matrices, that will be great. Thanks again. > > Best regards! > hjh > > 2015-11-06 > applyhhj > 发件人:Anders Peterson <an...@op...> > 发送时间:2015-11-06 19:29 > 主题:Re: [ojAlgo-user] how to manipulate complex matrix > 收件人:"ojalgo-user"<oja...@li...> > 抄送: > > Welcome to ojAlgo, > > I can’t think of a direct way to do that. You need to write a little utility like this: > > public static PrimitiveDenseStore getComplexModulus(final Access2D<ComplexNumber> arg) { > > final long tmpRows = arg.countRows(); > final long tmpColumns = arg.countColumns(); > final long tmpCount = tmpRows * tmpColumns; > > final PrimitiveDenseStore retVal = PrimitiveDenseStore.FACTORY.makeZero(tmpRows, tmpColumns); > > for (long i = 0; i < tmpCount; i++) { > retVal.set(i, arg.get(i).getModulus()); > } > > return retVal; > } > > > I’m thinking I should add methods like these to MatrixUtils. > > > /Anders > > > > On 6 nov. 2015, at 10:56, applyhhj <app...@16...> wrote: > > > > Hello, ojalgo community! > > > > I am new to ojalgo. Could any one tell me how to do the following operation? > > > > 1. How to get the modulus of a complex matrix? I mean calculate modulus of each element in a complex matrix and store it in a matrix of double type, not complex type. > > > > 2. Similarly how to get the angle of a matrix? > > > > Thank you very much! > > > > Regards! > > hjh > > > > > > 2015-11-06 > > applyhhj > > ------------------------------------------------------------------------------ > > _______________________________________________ > > ojAlgo-user mailing list > > ojA...@li... > > https://lists.sourceforge.net/lists/listinfo/ojalgo-user > > > ------------------------------------------------------------------------------ > _______________________________________________ > ojAlgo-user mailing list > ojA...@li... > https://lists.sourceforge.net/lists/listinfo/ojalgo-user > ------------------------------------------------------------------------------ > _______________________________________________ > ojAlgo-user mailing list > ojA...@li... > https://lists.sourceforge.net/lists/listinfo/ojalgo-user |