day1/exercise/linspace.py
changeset 64 333092b68926
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/day1/exercise/linspace.py	Thu Oct 08 18:59:47 2009 +0530
@@ -0,0 +1,10 @@
+def linspace(a, b, N):
+    lns = []
+    step = (float(b) - float(a)) / float(N - 1)
+    print step
+    for i in range(N):
+        lns.append(a + i*step)
+
+    return lns
+
+print linspace(0, 5, 11)