From ee59f1cf093d080570f781b7c32e4bb6db493020 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wojciech=20Wa=C5=9Bko?= Date: Thu, 24 Oct 2013 00:16:05 +0200 Subject: [PATCH] Added logspace which mimics Matlab/octave's logspace. --- src/documentation.html | 8 ++++++++ src/numeric.js | 6 ++++++ 2 files changed, 14 insertions(+) diff --git a/src/documentation.html b/src/documentation.html index 9767498..97393e6 100644 --- a/src/documentation.html +++ b/src/documentation.html @@ -98,6 +98,7 @@ largeArrayDon't prettyPrint Arrays larger than this leqPointwise x<=y linspaceGenerate evenly spaced values +logspaceGenerate logarithmically spaced values logPointwise Math.log(x) lshiftPointwise x<<y lshifteqPointwise x<<=y @@ -397,6 +398,13 @@

Utility functions

OUT> [1,1.5,2,2.5,3] +Or a vector of logarithmically spaced values between Math.pow(10,a) and Math.pow(10,b): + +
+IN> numeric.logspace(0,1,5);
+OUT> [1, 1.7782794100389228, 3.1622776601683795, 5.623413251903491, 10]
+
+