Saturday, 13 June 2015

R : Complex data type

You can define complex values in R.

> z=10+5i
> 
> z
[1] 10+5i
> 
> sqrt(z)
[1] 3.254254+0.768225i
>
> class(z)
[1] "complex"


Prevoius                                                 Next                                                 Home

No comments:

Post a Comment