diff options
author | Amit Sethi | 2010-11-10 02:12:09 +0530 |
---|---|---|
committer | Amit Sethi | 2010-11-10 02:12:09 +0530 |
commit | c629bdd70767cbf13a293065f9da2537dfd0ef72 (patch) | |
tree | 2571c76da4d04182c2026e2fc8c8ab0fa7b1262b /manipulating-lists/quickref.tex | |
parent | eafd0851f1785a5dc6d7922c6cae7df6783a4b68 (diff) | |
parent | dcc19f638a46eec9fe1d9d4879d320057d6bfee5 (diff) | |
download | st-scripts-c629bdd70767cbf13a293065f9da2537dfd0ef72.tar.gz st-scripts-c629bdd70767cbf13a293065f9da2537dfd0ef72.tar.bz2 st-scripts-c629bdd70767cbf13a293065f9da2537dfd0ef72.zip |
Changed in Plotting data and merged heads
Diffstat (limited to 'manipulating-lists/quickref.tex')
-rw-r--r-- | manipulating-lists/quickref.tex | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/manipulating-lists/quickref.tex b/manipulating-lists/quickref.tex index b26d168..d571a9e 100644 --- a/manipulating-lists/quickref.tex +++ b/manipulating-lists/quickref.tex @@ -1,8 +1,10 @@ -Creating a linear array:\\ -{\ex \lstinline| x = linspace(0, 2*pi, 50)|} +Slicing \& Striding a list:\\ +{\ex \lstinline| A[start:stop:step]|} \lstinline|stop| excluded -Plotting two variables:\\ -{\ex \lstinline| plot(x, sin(x))|} +Sorting a list:\\ +{\ex \lstinline| sorted(A)|} -- returns new list +{\ex \lstinline| A.sort()|} -- in-place sort -Plotting two lists of equal length x, y:\\ -{\ex \lstinline| plot(x, y)|} +Reversing a list:\\ +{\ex \lstinline| A[::-1]|} -- returns new list +{\ex \lstinline| A.reverse()|} -- in-place reverse |