Mercurial > octave-dspies
view examples/celldemo.cc @ 19005:bf7c5d96d1ff gui-release
improved regexp for file name suggestion when saving a new editor file
* file-editor-tab.cc (get_function_name): improved regexp used for finding the
function name when saving a new function file in the editor
author | Torsten <ttl@justmail.de> |
---|---|
date | Mon, 11 Aug 2014 19:28:08 +0200 |
parents | be41c30bcb44 |
children |
line wrap: on
line source
#include <octave/oct.h> #include <octave/Cell.h> DEFUN_DLD (celldemo, args, , "Cell Demo") { octave_value_list retval; int nargin = args.length (); if (nargin != 1) print_usage (); else { Cell c = args(0).cell_value (); if (! error_state) for (octave_idx_type i = 0; i < c.numel (); i++) { retval(i) = c(i); // using operator syntax //retval(i) = c.elem (i); // using method syntax } } return retval; }