23 #if defined (HAVE_CONFIG_H)
45 error (
"%s: dimension vector DIMS must not be empty", name);
52 if (ii == dimsv(
i) && ii >= 0)
55 error (
"%s: dimension vector DIMS must contain integers", name);
117 for (
int j = 0; j < nargin - 1; j++)
120 error (
"sub2ind: subscripts must be numeric");
124 idxa(j) =
args(j+1).index_vector ();
127 error (
"sub2ind: all subscripts must be of the same size");
257 if (
args.length () != 2)
271 error (
"ind2sub: Invalid index %s. %s", e.
idx ().c_str (),
OCTAVE_EXPORT octave_value_list isa nd deftypefn *return ovl(args(0).is_integer_type())
OCTINTERP_API void print_usage(void)
octave_idx_type numel(void) const
Number of elements in the array.
identity matrix If supplied two scalar respectively For allows like xample val
void set_pos_if_unset(octave_idx_type nd_arg, octave_idx_type dim_arg)
bool is_numeric_type(void) const
void resize(int n, int fill_value=0)
#define DEFUN(name, args_name, nargout_name, doc)
void error(const char *fmt,...)
std::string idx(void) const
virtual std::string message(void) const
static dim_vector get_dim_vector(const octave_value &val, const char *name)
void set_var(const std::string &var_arg="")
idx_vector index_vector(bool require_integers=false) const
OCTAVE_EXPORT octave_value_list return the number of command line arguments passed to Octave If called with the optional argument the function xample nargout(@histc)
idx_vector sub2ind(const dim_vector &dv, const Array< idx_vector > &idxa)
virtual const char * err_id(void) const =0
void error_with_id(const char *id, const char *fmt,...)
dim_vector redim(int n) const
the exceeded dimensions are set to if fewer subscripts than dimensions are the exceeding dimensions are merged into the final requested dimension For consider the following dims
N Dimensional Array with copy-on-write semantics.
Array< idx_vector > ind2sub(const dim_vector &dv, const idx_vector &idx)
charNDArray max(char d, const charNDArray &m)
=val(i)}if ode{val(i)}occurs in table i
RowVector row_vector_value(bool frc_str_conv=false, bool frc_vec_conv=false) const
virtual std::string details(void) const =0
Vector representing the dimensions (size) of an Array.
If this string is the system will ring the terminal sometimes it is useful to be able to print the original representation of the string