author | Anoop Jacob Thomas<anoop@fossee.in> |
Tue, 12 Oct 2010 16:26:36 +0530 | |
changeset 308 | 0a0a91fb3a0d |
parent 285 | 7c4855fb8e5f |
permissions | -rw-r--r-- |
285 | 1 |
\textbf{Accessing parts of arrays} |
2 |
||
3 |
\lstinline|C[i-1, j-1]| to access element i, j in C (mxn). |
|
4 |
\lstinline|C[i-1]| to access i^{th} row |
|
5 |
\lstinline|C[:, j-1]| to access j^{th} column |
|
217
b595f90016c5
Changed structure of my scripts.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
6 |
|
285 | 7 |
Assigning to accessed elements, changes them. |
217
b595f90016c5
Changed structure of my scripts.
Puneeth Chaganti <punchagan@fossee.in>
parents:
diff
changeset
|
8 |
|
285 | 9 |
\lstinline|A[m:n:o]| accesses the rows from \lstinline|m| |
10 |
to \lstinline|n| (excluded) in steps of \lstinline|o| |
|
11 |
||
12 |
Similarly, \lstinline|C[m:n:o, p:q:r]| |