Minor edits.
authorSantosh G. Vattam <vattam.santosh@gmail.com>
Fri, 16 Apr 2010 12:04:03 +0530
changeset 75 3a94917224e9
parent 74 12729a0a1893
child 76 6dfdb6fc9d80
Minor edits.
arrays.txt
least-squares.org
--- a/arrays.txt	Fri Apr 16 12:02:43 2010 +0530
+++ b/arrays.txt	Fri Apr 16 12:04:03 2010 +0530
@@ -1,6 +1,6 @@
 Hello friends and welcome to this tutorial on Matrices.
 In python all matrix operations are done using arrays.
-We have already seen in previous session that how arrays are better suited for certain mathematical operations. In this session we are going to cover more details on using Arrays as matrices, such as, how to create them, how to initialize them, how to manipulate and use them for solving given problem.
+We have already seen in previous session that how arrays are better suited for certain mathematical operations. In this session we shall see how to perform efficient matrix operations using arrays. We shall see how to create them, how to initialize them, how to manipulate and use them to perform some basic image processing. For this tutorial we shall need the lena.png image. Hope you have the image with you. 
 
 Let's now start off. As you can see our lena image is on the desktop, so first let's navigate to the desktop by cd Desktop.
 
@@ -33,8 +33,6 @@
 Similarly there are functions like zeros and zeros_like which initialize array with all values being 0. One more useful function available is 'identity', it create identity matrix of given order
 i = identity(3)
 i
-i = identity(5)
-i
 
 Note that identity takes just one argument since identity matrix is always a square matrix.
 
@@ -73,7 +71,7 @@
 the c[1] we were using earlier can also be written as c[1,:]
 
 ':' actually takes two value. for any row or column we can mention
-start:end values, and rows/columns starting for 'start' till 'end' will be returned. Lets try some examples for better understanding
+start:end values, and rows or columns starting for 'start' till 'end' will be returned. Lets try some examples for better understanding
 c[0:2,:]
 results in rows starting from row zero(0) upto the second row and all columns. Note here that 'end', in this case, '2' will not be included in resulting array.
 
--- a/least-squares.org	Fri Apr 16 12:02:43 2010 +0530
+++ b/least-squares.org	Fri Apr 16 12:04:03 2010 +0530
@@ -20,7 +20,7 @@
     
     In this tutorial we shall look at obtaining the least squares fit
     of a given data-set. For this purpose, we shall use the same
-    pendulum data used in the tutorial on plotting from files.
+    pendulum data that we used in the tutorial on plotting from files.
 
     To be able to follow this tutorial comfortably, you should have a
     working knowledge of arrays, plotting and file reading. 
@@ -42,7 +42,7 @@
     {Show a slide here?}
     
     We have already seen (in a previous tutorial), how to read a file
-    and obtain the data set. We shall quickly get the required data
+    and obtain the data set. Let's quickly get the required data
     from our file. 
 
     In []: l = []
@@ -79,8 +79,8 @@
     information. 
     In []: result = lstsq(A,tsq)
 
-    We take put the required coefficients, which are the first thing
-    in the list of things that lstsq returns, into the variable coef. 
+    We extract the required coefficients, which is the first element
+    in the list of things that lstsq returns, and store them into the variable coef. 
     In []: coef = result[0]
 
     To obtain the plot of the line, we simply use the equation of the