-
Notifications
You must be signed in to change notification settings - Fork 133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
There is a method in nmatrix for matrix exponential? #622
Comments
I don't believe we've implemented one. I think the pseudocode for doing so is right there in the Matlab docs, so I'd be eager to get a pull request for it. ( I also have code for a separate matrix exponential, for computing rotations, so if that's what you're looking for, I can point you that way. (It's in Python right now, and possibly has a bug.) |
Yeah the pseudocode is that but V and D are given for this matlab function: |
The method you're looking for is from lapack and atlas. It's called You could look in:
The methods are documented elsewhere, but I find the specs are pretty good for seeing them actually used. |
I have installed nmatrix-lapacke to implement the matlab method but I have the following problem, when I use the method geev as:
Both gems, nmatrix and nmatrix-lapacke are installed using gem install. How the libraries must be loaded? and how the methods must be invoked? |
I believe you want |
I have tested the require that you suggest to me and now I have de following error:
My sysadmim has perform a deep research and he has checked the libraries with ldd:
What can be happening with this? |
Have you followed the instructions on our wiki for installing ATLAS, lapacke, the gems, etc? It looks like you've got two versions installed and it's finding the wrong ones. |
Hi all
With these lines, nmatrix installs succesfully. Also, I've implemented the exponetial matrix as follows (with the matlab documentation):
With the toy example this code works, but when I use a bigger real matrix the Math.exp complains by receive complex numbers. How I can deal with this problem? There is another aproximation as power series or something? |
You could do a check for when val is complex. Say val = a+bi. Then exp(val) = exp(a) * (cos(b) + i * sin(b)). Lemme know if you find this useful. |
I need to use the matrix exponential operation as can be seen here:
https://www.mathworks.com/help/matlab/ref/expm.html
There is a method for this operation in nmatrix? If is not, how can I implement it using the nmatrix methods?
Thanks in advance
The text was updated successfully, but these errors were encountered: