femtoduino / ArduinoCore-atsamd21e18a

Arduino Core and Bootloader for the ATMEL SAM D21/R21 (E Variant) chips.
https://femto.io
29 stars 15 forks source link

Example program for finding eigenvalues #33

Open abiramimurukesan opened 4 years ago

abiramimurukesan commented 4 years ago

I am computing eigen values for a real matrix but it returns eigen values in complex form. Also could you provide me snippet for printing the eigen values returned using serial.print in arduino IDE.

zrecore commented 4 years ago

May I ask you for a sample of the code you are using?

On Wed, Feb 12, 2020, 4:32 AM abiramimurukesan notifications@github.com wrote:

I am computing eigen values for a real matrix but it returns eigen values in complex form. Also could you provide me snippet for printing the eigen values returned using serial.print in arduino IDE.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/femtoduino/ArduinoCore-atsamd21e18a/issues/33?email_source=notifications&email_token=AADIW3AFQWJGNT2EAC2OFYLRCPT4ZA5CNFSM4KTY4MF2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IM5PZKA, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADIW3CRZ6NM3MKTMMTZ263RCPT4ZANCNFSM4KTY4MFQ .

abiramimurukesan commented 4 years ago

Hi there, thanks for showing concern. Bl is the code snippet I have used. Input matix R is real but why do I get eigenvalues as std::complex?

include

include <Eigen/LU>

include <Eigen/Dense>

using namespace Eigen;

void setup() {

Serial.begin(9600); delay(5000); MatrixXf R(6,6); MatrixXcf Z; MatrixXcf V;

R << 0.3252, 0.3192, 1.0933, -0.0068, -1.0891, -1.4916, -0.7549, 0.3129, 1.1093, 1.5326, 0.0326, -0.7423, 1.3703, -0.8649, -0.8637, -0.7697, 0.5525, -1.0616, -1.7115, -0.0301, 0.0774, 0.3714, 1.1006, 2.3505, -0.1022, -0.1649, -1.2141, -0.2256, 1.5442, -0.6156, -0.2414, 0.6277, -1.1135, 1.1174, 0.0859, 0.7481; EigenSolver es(R); Z = es.eigenvalues(); V = es.eigenvectors(); }

regards Abirami M

On Thu, Feb 13, 2020 at 12:51 AM Alex Albino notifications@github.com wrote:

May I ask you for a sample of the code you are using?

On Wed, Feb 12, 2020, 4:32 AM abiramimurukesan notifications@github.com wrote:

I am computing eigen values for a real matrix but it returns eigen values in complex form. Also could you provide me snippet for printing the eigen values returned using serial.print in arduino IDE.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub < https://github.com/femtoduino/ArduinoCore-atsamd21e18a/issues/33?email_source=notifications&email_token=AADIW3AFQWJGNT2EAC2OFYLRCPT4ZA5CNFSM4KTY4MF2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IM5PZKA , or unsubscribe < https://github.com/notifications/unsubscribe-auth/AADIW3CRZ6NM3MKTMMTZ263RCPT4ZANCNFSM4KTY4MFQ

.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/femtoduino/ArduinoCore-atsamd21e18a/issues/33?email_source=notifications&email_token=AGAUYFLNXM5PGBQUW2LS7A3RCRD3XA5CNFSM4KTY4MF2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOELSBNPY#issuecomment-585373375, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGAUYFOKMGBOM2Z3LJPBVW3RCRD3XANCNFSM4KTY4MFQ .