accessing_parts_of_arrays/quickref.tex
author Puneeth Chaganti <punchagan@fossee.in>
Wed, 01 Dec 2010 16:51:35 +0530
changeset 522 d33698326409
permissions -rw-r--r--
Renamed all LOs to match with their names in progress.org.

\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]|