Skip to content

Commit

Permalink
Merge pull request JuliaLang#516 from pao/topic/logspace
Browse files Browse the repository at this point in the history
Added mostly MATLAB-compatible function logspace().
  • Loading branch information
JeffBezanson committed Mar 4, 2012
2 parents 827847d + 2a3162c commit b22a306
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions jl/array.jl
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,9 @@ end

linspace(start::Real, stop::Real) = [ i | i=start:stop ]

logspace(start::Real, stop::Real, n::Integer) = 10.^linspace(start, stop, n)
logspace(start::Real, stop::Real) = logspace(start, stop, 50)

## Conversions ##

convert{T,n}(::Type{Array{T,n}}, x::Array{T,n}) = x
Expand Down

0 comments on commit b22a306

Please sign in to comment.