Mercurial > octave
comparison scripts/general/reshape.m @ 2311:2b5788792cad
[project @ 1996-07-11 20:18:38 by jwe]
author | jwe |
---|---|
date | Thu, 11 Jul 1996 20:18:38 +0000 |
parents | 5cffc4b8de57 |
children | 5ca126254d15 |
comparison
equal
deleted
inserted
replaced
2310:e2a8f216373d | 2311:2b5788792cad |
---|---|
15 ### You should have received a copy of the GNU General Public License | 15 ### You should have received a copy of the GNU General Public License |
16 ### along with Octave; see the file COPYING. If not, write to the Free | 16 ### along with Octave; see the file COPYING. If not, write to the Free |
17 ### Software Foundation, 59 Temple Place - Suite 330, Boston, MA | 17 ### Software Foundation, 59 Temple Place - Suite 330, Boston, MA |
18 ### 02111-1307, USA. | 18 ### 02111-1307, USA. |
19 | 19 |
20 ## usage: reshape (a, m, n) | |
21 ## | |
22 ## Form an m x n matrix from the elements of a (taken in Fortran's | |
23 ## column major ordering). | |
24 ## | |
25 ## See also: `:', do_fortran_indexing | |
26 | |
20 function retval = reshape (a, m, n) | 27 function retval = reshape (a, m, n) |
21 | |
22 ## usage: reshape (a, m, n) | |
23 ## | |
24 ## Form an m x n matrix from the elements of a (taken in Fortran's | |
25 ## column major ordering). | |
26 ## | |
27 ## See also: `:', do_fortran_indexing | |
28 | 28 |
29 if (nargin != 3) | 29 if (nargin != 3) |
30 usage ("reshape (a, m, n)"); | 30 usage ("reshape (a, m, n)"); |
31 else | 31 else |
32 [nr, nc] = size (a); | 32 [nr, nc] = size (a); |