25 #if defined (HAVE_CONFIG_H) 51 if (args.length () != 1)
125 int nargin = args.length ();
156 if (m >= 0 && n >= 0)
159 error (
"sparse: dimensions must be non-negative");
163 bool summation =
true;
169 else if (opt ==
"sum" || opt ==
"summation")
172 error (
"sparse: invalid option: %s", opt.c_str ());
181 nzmax = args(5).idx_type_value ();
190 error (
"sparse: dimensions must be non-negative");
202 m, n, summation,
nzmax);
205 i, j, m, n, summation,
nzmax);
208 m, n, summation,
nzmax);
215 e.set_pos_if_unset (2,
k+1);
223 DEFUN (spalloc, args, ,
261 int nargin = args.length ();
271 nz = args(2).idx_type_value ();
273 if (m >= 0 && n >= 0 && nz >= 0)
276 error (
"spalloc: M,N,NZ must be non-negative");
sparse(ar{i}, ar{j}, ar{sv}, 3, 4) esult
bool islogical(void) const
OCTINTERP_API void print_usage(void)
#define DEFUN(name, args_name, nargout_name, doc)
Macro to define a builtin function.
void error(const char *fmt,...)
OCTAVE_EXPORT octave_value_list isnumeric
OCTAVE_EXPORT octave_value_list islogical
bool issparse(void) const
void err_wrong_type_arg(const char *name, const char *s)
SparseComplexMatrix sparse_complex_matrix_value(bool frc_str_conv=false) const
OCTINTERP_API void get_dimensions(const octave_value &a, const char *warn_for, dim_vector &dim)
octave::unwind_protect frame
boolNDArray bool_array_value(bool warn=false) const
OCTAVE_EXPORT octave_value_list isa nd deftypefn *return ovl(args(0).isinteger())
SparseMatrix sparse_matrix_value(bool frc_str_conv=false) const
bool iscomplex(void) const
SparseBoolMatrix sparse_bool_matrix_value(bool warn=false) const
bool is_string(void) const
ComplexNDArray complex_array_value(bool frc_str_conv=false) const
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
NDArray array_value(bool frc_str_conv=false) const
octave_idx_type nzmax(void) const
bool isnumeric(void) const