accessing-pieces-arrays/quickref.tex
author Anoop Jacob Thomas<anoop@fossee.in>
Wed, 10 Nov 2010 17:39:42 +0530
changeset 444 1aa91f8d8d59
parent 285 7c4855fb8e5f
permissions -rw-r--r--
added script getting started with functions.

\textbf{Accessing parts of arrays}

\lstinline|C[i-1, j-1]| to access element i, j in C (mxn).
\lstinline|C[i-1]| to access i^{th} row
\lstinline|C[:, j-1]| to access j^{th} column

Assigning to accessed elements, changes them. 

\lstinline|A[m:n:o]| accesses the rows from \lstinline|m|
to \lstinline|n| (excluded) in steps of \lstinline|o|

Similarly, \lstinline|C[m:n:o, p:q:r]|