Re: Doing matrix arithmetic with complex numbers

2016-03-07 Thread Al Matthews
+1

On Sat, Mar 5, 2016, 22:12 Mars0i  wrote:

> You might want to post this on the Numerical clojure group as well or
> instead.  I've never tried using complex numbers with core.matrix.
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
-- 

Alfred S Matthews

+1 337 214 4688

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Doing matrix arithmetic with complex numbers

2016-03-05 Thread Mars0i
You might want to post this on the Numerical clojure group as well or 
instead.  I've never tried using complex numbers with core.matrix.
 

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Doing matrix arithmetic with complex numbers

2016-03-04 Thread Willem Price
Hi all,

I am trying to use the core.matrix.complex 

 library 
to do matrix multiplication and such with complex numbers, but I cannot get 
it to work. The library uses complex.core 
 to 
define and manipulate complex numbers, and core.matrix 
 to do matrix arithmetic.

Using matrix multiplication, mmul, as an example, I can require core.matrix 
as mat, and then do (mat/mmul matrix1 matrix2) and it works no problem. 
However, if I require core.matrix.complex and then try to do mmul, the 
function is undefined. Naturally, I tried requiring them both and using 
them together, but if I do (mat/mmul cmat1 cmat2), where cmat means a 
complex matrix, I get a "ClassCastException 
org.apache.commons.math3.complex.Complex cannot be cast to java.lang.Number"

I am not that familiar with protocols and deftype, so I haven't been able 
to decipher the library and how it's supposed to be used. Can anyone help 
me?

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.