From help-request at octave dot org Tue Feb 8 07:19:32 2005 Subject: indexing in octfile From: Brian Blais To: help at octave dot org Date: Tue, 08 Feb 2005 08:23:34 -0500 Hello, I have a question about doing indexing in an oct file. If the following cc code: Matrix m = args(0).matrix_value(); idx_vector idx(Range (3,6)); Matrix ret = (Matrix) m.index (idx, 0); is equivalent to the following octave code: ret=m(3:6); what is the equivalent cc code for: m(3:6)=5 or m(3:6)=6:8; or m(3:6)=m(3:6)+6:8; ? thanks! Brian Blais -- ----------------- bblais at bryant dot edu http://web.bryant.edu/~bblais ------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.octave.org How to fund new projects: http://www.octave.org/funding.html Subscription information: http://www.octave.org/archive.html -------------------------------------------------------------