67 const octave_idx_type&,
const octave_idx_type&,
68 const octave_idx_type&,
const octave_idx_type&,
75 const octave_idx_type&,
float*,
76 const octave_idx_type&, octave_idx_type&,
77 octave_idx_type&,
float*, octave_idx_type&
83 const octave_idx_type&,
const octave_idx_type&,
84 const octave_idx_type&,
float*,
85 const octave_idx_type&,
float*,
86 const octave_idx_type&, octave_idx_type&
94 const octave_idx_type&,
const octave_idx_type&,
95 const octave_idx_type&,
const float&,
const float*,
96 const octave_idx_type&,
const float*,
97 const octave_idx_type&,
const float&,
float*,
98 const octave_idx_type&
104 const octave_idx_type&,
const octave_idx_type&,
105 const float&,
const float*,
106 const octave_idx_type&,
const float*,
107 const octave_idx_type&,
const float&,
float*,
108 const octave_idx_type&
112 F77_FUNC (
xsdot, XSDOT) (
const octave_idx_type&,
const float*,
113 const octave_idx_type&,
const float*,
114 const octave_idx_type&,
float&);
119 const octave_idx_type&,
const octave_idx_type&,
120 const float&,
const float*,
const octave_idx_type&,
121 const float&,
float*,
const octave_idx_type&
126 F77_FUNC (sgetrf, SGETRF) (
const octave_idx_type&,
127 const octave_idx_type&,
float*,
128 const octave_idx_type&,
129 octave_idx_type*, octave_idx_type&);
133 const octave_idx_type&,
const octave_idx_type&,
134 const float*,
const octave_idx_type&,
135 const octave_idx_type*,
float*,
136 const octave_idx_type&, octave_idx_type&
140 F77_FUNC (sgetri, SGETRI) (
const octave_idx_type&,
float*,
141 const octave_idx_type&,
const octave_idx_type*,
142 float*,
const octave_idx_type&, octave_idx_type&);
146 const octave_idx_type&,
float*,
147 const octave_idx_type&,
const float&,
float&,
148 float*, octave_idx_type*, octave_idx_type&
152 F77_FUNC (sgelsy, SGELSY) (
const octave_idx_type&,
const octave_idx_type&,
153 const octave_idx_type&,
float*,
154 const octave_idx_type&,
float*,
155 const octave_idx_type&, octave_idx_type*,
156 float&, octave_idx_type&,
float*,
157 const octave_idx_type&, octave_idx_type&);
160 F77_FUNC (sgelsd, SGELSD) (
const octave_idx_type&,
const octave_idx_type&,
161 const octave_idx_type&,
float*,
162 const octave_idx_type&,
float*,
163 const octave_idx_type&,
float*,
float&,
164 octave_idx_type&,
float*,
165 const octave_idx_type&, octave_idx_type*,
170 const octave_idx_type&,
float *,
171 const octave_idx_type&, octave_idx_type&
176 const octave_idx_type&,
float*,
177 const octave_idx_type&,
const float&,
178 float&,
float*, octave_idx_type*,
183 const octave_idx_type&,
const octave_idx_type&,
184 const float*,
const octave_idx_type&,
float*,
185 const octave_idx_type&, octave_idx_type&
191 const octave_idx_type&,
const float*,
192 const octave_idx_type&, octave_idx_type&
199 const octave_idx_type&,
const float*,
200 const octave_idx_type&,
float&,
201 float*, octave_idx_type*, octave_idx_type&
209 const octave_idx_type&,
210 const octave_idx_type&,
const float*,
211 const octave_idx_type&,
float*,
212 const octave_idx_type&, octave_idx_type&
218 F77_FUNC (slartg, SLARTG) (
const float&,
const float&,
float&,
224 const octave_idx_type&,
const octave_idx_type&,
225 const octave_idx_type&,
const float*,
226 const octave_idx_type&,
const float*,
227 const octave_idx_type&,
const float*,
228 const octave_idx_type&,
float&, octave_idx_type&
234 const octave_idx_type&,
235 const octave_idx_type&,
const float*,
236 const octave_idx_type&,
float*,
float&
266 elem (ia(i), i) = 1.0;
269 elem (i, ia(i)) = 1.0;
284 elem (i, j) =
static_cast<unsigned char> (a.
elem (i, j));
299 return !(*
this == a);
332 if (r < 0 || r >=
rows () || c < 0 || c + a_len >
cols ())
334 (*current_liboctave_error_handler) (
"range error for insert");
355 if (r < 0 || r + a_len >
rows () || c < 0 || c >=
cols ())
357 (*current_liboctave_error_handler) (
"range error for insert");
379 if (r < 0 || r + a_nr >
rows () || c < 0 || c + a_nc >
cols ())
381 (*current_liboctave_error_handler) (
"range error for insert");
385 fill (0.0, r, c, r + a_nr - 1, c + a_nc - 1);
406 if (nr > 0 && nc > 0)
425 if (r1 < 0 || r2 < 0 || c1 < 0 || c2 < 0
426 || r1 >= nr || r2 >= nr || c1 >= nc || c2 >= nc)
428 (*current_liboctave_error_handler) (
"range error for fill");
432 if (r1 > r2) { std::swap (r1, r2); }
433 if (c1 > c2) { std::swap (c1, c2); }
435 if (r2 >= r1 && c2 >= c1)
454 (*current_liboctave_error_handler) (
"row dimension mismatch for append");
460 retval.
insert (*
this, 0, 0);
461 retval.
insert (a, 0, nc_insert);
472 (*current_liboctave_error_handler) (
"row dimension mismatch for append");
478 retval.
insert (*
this, 0, 0);
479 retval.
insert (a, 0, nc_insert);
490 (*current_liboctave_error_handler) (
"row dimension mismatch for append");
496 retval.
insert (*
this, 0, 0);
497 retval.
insert (a, 0, nc_insert);
508 (*current_liboctave_error_handler) (
"row dimension mismatch for append");
514 retval.
insert (*
this, 0, 0);
515 retval.
insert (a, 0, nc_insert);
526 (*current_liboctave_error_handler)
527 (
"column dimension mismatch for stack");
533 retval.
insert (*
this, 0, 0);
534 retval.
insert (a, nr_insert, 0);
545 (*current_liboctave_error_handler)
546 (
"column dimension mismatch for stack");
552 retval.
insert (*
this, 0, 0);
553 retval.
insert (a, nr_insert, 0);
564 (*current_liboctave_error_handler)
565 (
"column dimension mismatch for stack");
571 retval.
insert (*
this, 0, 0);
572 retval.
insert (a, nr_insert, 0);
583 (*current_liboctave_error_handler)
584 (
"column dimension mismatch for stack");
590 retval.
insert (*
this, 0, 0);
591 retval.
insert (a, nr_insert, 0);
611 if (r1 > r2) { std::swap (r1, r2); }
612 if (c1 > c2) { std::swap (c1, c2); }
644 return inverse (mattype, info, rcon, 0, 0);
652 return inverse (mattype, info, rcon, 0, 0);
660 return inverse (mattype, info, rcon, force, calc_cond);
668 return inverse (mattype, info, rcon, 0, 0);
675 return inverse (mattype, info, rcon, 0, 0);
680 int force,
int calc_cond)
const
687 if (nr != nc || nr == 0 || nc == 0)
688 (*current_liboctave_error_handler) (
"inverse requires square matrix");
691 int typ = mattype.
type ();
699 nr, tmp_data, nr, info
718 nr, tmp_data, nr, rcon,
719 work, iwork, dtrcon_info
724 if (dtrcon_info != 0)
728 if (info == -1 && ! force)
738 int force,
int calc_cond)
const
745 if (nr != nc || nr == 0 || nc == 0)
746 (*current_liboctave_error_handler) (
"inverse requires square matrix");
759 F77_XFCN (sgetri, SGETRI, (nc, tmp_data, nr, pipvt,
763 lwork = (lwork < 2 *nc ? 2*nc : lwork);
772 anorm = retval.
abs ().
sum ().
row (static_cast<octave_idx_type>(0))
775 F77_XFCN (sgetrf, SGETRF, (nc, nc, tmp_data, nr, pipvt, info));
790 nc, tmp_data, nr, anorm,
791 rcon, pz, piz, dgecon_info
794 if (dgecon_info != 0)
798 if (info == -1 && ! force)
804 F77_XFCN (sgetri, SGETRI, (nc, tmp_data, nr, pipvt,
805 pz, lwork, dgetri_info));
807 if (dgetri_info != 0)
820 int force,
int calc_cond)
const
822 int typ = mattype.
type (
false);
826 typ = mattype.
type (*
this);
829 ret =
tinverse (mattype, info, rcon, force, calc_cond);
838 rcon = chol.
rcond ();
848 ret =
finverse (mattype, info, rcon, force, calc_cond);
850 if ((mattype.
is_hermitian () || calc_cond) && rcon == 0.)
875 tol = nr * sigma.
elem (0) * std::numeric_limits<double>::epsilon ();
877 tol = nc * sigma.
elem (0) * std::numeric_limits<double>::epsilon ();
880 while (r >= 0 && sigma.
elem (r) < tol)
894 #if defined (HAVE_FFTW)
904 size_t npts, nsamples;
906 if (nr == 1 || nc == 1)
908 npts = nr > nc ? nr : nc;
933 size_t npts, nsamples;
935 if (nr == 1 || nc == 1)
937 npts = nr > nc ? nr : nc;
997 F77_FUNC (
cfftb, CFFTB) (
const octave_idx_type&, FloatComplex*,
1011 if (nr == 1 || nc == 1)
1013 npts = nr > nc ? nr : nc;
1052 if (nr == 1 || nc == 1)
1054 npts = nr > nc ? nr : nc;
1081 tmp_data[j] = tmp_data[j] / static_cast<float> (npts);
1096 if (nr == 1 || nc == 1)
1098 npts = nr > nc ? nr : nc;
1129 pwsave = wsave.fortran_vec ();
1141 prow[i] = tmp_data[i*nr + j];
1146 tmp_data[i*nr + j] = prow[i];
1162 if (nr == 1 || nc == 1)
1164 npts = nr > nc ? nr : nc;
1191 tmp_data[j] = tmp_data[j] / static_cast<float> (npts);
1198 pwsave = wsave.fortran_vec ();
1210 prow[i] = tmp_data[i*nr + j];
1215 tmp_data[i*nr + j] = prow[i] / static_cast<float> (npts);
1240 int calc_cond)
const
1243 return determinant (mattype, info, rcon, calc_cond);
1249 int calc_cond)
const
1260 (*current_liboctave_error_handler) (
"matrix must be square");
1263 volatile int typ = mattype.
type ();
1270 typ = mattype.
type (*
this);
1277 retval *=
elem (i,i);
1285 if (calc_cond) anorm =
xnorm (*
this, 1);
1307 nr, tmp_data, nr, anorm,
1315 retval *= atmp (i,i);
1317 retval = retval.
square ();
1321 (*current_liboctave_error_handler) (
"det: invalid dense matrix type");
1335 if (calc_cond) anorm =
xnorm (*
this, 1);
1337 F77_XFCN (sgetrf, SGETRF, (nr, nr, tmp_data, nr, pipvt, info));
1358 nc, tmp_data, nr, anorm,
1372 float c = atmp(i,i);
1373 retval *= (ipvt(i) != (i+1)) ? -c : c;
1387 return rcond (mattype);
1398 (*current_liboctave_error_handler) (
"matrix must be square");
1399 else if (nr == 0 || nc == 0)
1403 volatile int typ = mattype.
type ();
1406 typ = mattype.
type (*
this);
1425 nr, tmp_data, nr, rcon,
1435 (*current_liboctave_error_handler)
1436 (
"permuted triangular matrix not implemented");
1453 nr, tmp_data, nr, rcon,
1463 (*current_liboctave_error_handler)
1464 (
"permuted triangular matrix not implemented");
1477 anorm = atmp.
abs().
sum().
1478 row(static_cast<octave_idx_type>(0)).
max();
1498 nr, tmp_data, nr, anorm,
1518 anorm = atmp.
abs ().
sum ().
1519 row(static_cast<octave_idx_type>(0)).
max ();
1526 F77_XFCN (sgetrf, SGETRF, (nr, nr, tmp_data, nr, pipvt, info));
1537 nc, tmp_data, nr, anorm,
1556 float& rcon, solve_singularity_handler sing_handler,
1564 if (nr != b.
rows ())
1566 (
"matrix dimension mismatch solution of linear equations");
1567 else if (nr == 0 || nc == 0 || b.
cols () == 0)
1571 volatile int typ = mattype.
type ();
1582 (*current_liboctave_error_handler)
1583 (
"permuted triangular matrix not implemented");
1603 nr, tmp_data, nr, rcon,
1612 volatile float rcond_plus_one = rcon + 1.0;
1614 if (rcond_plus_one == 1.0 ||
xisnan (rcon))
1619 sing_handler (rcon);
1622 (
"matrix singular to machine precision, rcond = %g",
1639 nr, b_nc, tmp_data, nr,
1657 float& rcon, solve_singularity_handler sing_handler,
1665 if (nr != b.
rows ())
1667 (
"matrix dimension mismatch solution of linear equations");
1668 else if (nr == 0 || nc == 0 || b.
cols () == 0)
1672 volatile int typ = mattype.
type ();
1683 (*current_liboctave_error_handler)
1684 (
"permuted triangular matrix not implemented");
1704 nr, tmp_data, nr, rcon,
1713 volatile float rcond_plus_one = rcon + 1.0;
1715 if (rcond_plus_one == 1.0 ||
xisnan (rcon))
1720 sing_handler (rcon);
1723 (
"matrix singular to machine precision, rcond = %g",
1740 nr, b_nc, tmp_data, nr,
1758 float& rcon, solve_singularity_handler sing_handler,
1759 bool calc_cond)
const
1766 if (nr != nc || nr != b.
rows ())
1768 (
"matrix dimension mismatch solution of linear equations");
1769 else if (nr == 0 || b.
cols () == 0)
1773 volatile int typ = mattype.
type ();
1786 anorm = atmp.
abs().
sum().
row(static_cast<octave_idx_type>(0)).
max();
1811 nr, tmp_data, nr, anorm,
1818 volatile float rcond_plus_one = rcon + 1.0;
1820 if (rcond_plus_one == 1.0 ||
xisnan (rcon))
1825 sing_handler (rcon);
1828 (
"matrix singular to machine precision, rcond = %g",
1841 nr, b_nc, tmp_data, nr,
1842 result, b.
rows (), info
1864 anorm = atmp.
abs().
sum().
row(static_cast<octave_idx_type>(0)).
max();
1871 F77_XFCN (sgetrf, SGETRF, (nr, nr, tmp_data, nr, pipvt, info));
1880 sing_handler (rcon);
1883 (
"matrix singular to machine precision");
1895 nc, tmp_data, nr, anorm,
1902 volatile float rcond_plus_one = rcon + 1.0;
1904 if (rcond_plus_one == 1.0 ||
xisnan (rcon))
1909 sing_handler (rcon);
1912 (
"matrix singular to machine precision, rcond = %g",
1926 nr, b_nc, tmp_data, nr,
1927 pipvt, result, b.
rows (), info
1935 (*current_liboctave_error_handler) (
"incorrect matrix type");
1946 return solve (typ, b, info, rcon, 0);
1954 return solve (typ, b, info, rcon, 0);
1961 return solve (typ, b, info, rcon, 0);
1967 float& rcon, solve_singularity_handler sing_handler,
1971 int typ = mattype.
type ();
1974 typ = mattype.
type (*
this);
1978 retval =
utsolve (mattype, b, info, rcon, sing_handler,
false, transt);
1980 retval =
ltsolve (mattype, b, info, rcon, sing_handler,
false, transt);
1985 retval =
fsolve (mattype, b, info, rcon, sing_handler,
true);
1988 (*current_liboctave_error_handler) (
"unknown matrix type");
1996 retval =
lssolve (b, info, rank, rcon);
2007 return solve (typ, b, info, rcon, 0);
2015 return solve (typ, b, info, rcon, 0);
2023 return solve (typ, b, info, rcon, 0);
2046 const float *smd = sm.
data ();
2056 float& rcon, solve_singularity_handler sing_handler,
2060 tmp =
solve (typ, tmp, info, rcon, sing_handler, singular_fallback, transt);
2068 return solve (typ, b, info, rcon);
2076 return solve (typ, b, info, rcon);
2084 return solve (typ, b, info, rcon, 0);
2090 float& rcon, solve_singularity_handler sing_handler,
2094 tmp =
solve (typ, tmp, info, rcon, sing_handler,
true, transt);
2095 return tmp.
column (static_cast<octave_idx_type> (0));
2102 return tmp.
solve (typ, b);
2110 return tmp.
solve (typ, b, info);
2118 return tmp.
solve (typ, b, info, rcon);
2124 solve_singularity_handler sing_handler,
2128 return tmp.
solve (typ, b, info, rcon, sing_handler, transt);
2136 return solve (b, info, rcon, 0);
2143 return solve (b, info, rcon, 0);
2150 return solve (b, info, rcon, 0);
2155 float& rcon, solve_singularity_handler sing_handler,
2159 return solve (mattype, b, info, rcon, sing_handler,
true, transt);
2166 return tmp.
solve (b);
2173 return tmp.
solve (b, info);
2181 return tmp.
solve (b, info, rcon);
2187 solve_singularity_handler sing_handler,
2191 return tmp.
solve (b, info, rcon, sing_handler, transt);
2198 return solve (b, info, rcon);
2205 return solve (b, info, rcon);
2212 return solve (b, info, rcon, 0);
2217 float& rcon, solve_singularity_handler sing_handler,
2221 return solve (mattype, b, info, rcon, sing_handler, transt);
2228 return tmp.
solve (b);
2236 return tmp.
solve (b, info);
2244 return tmp.
solve (b, info, rcon);
2249 float& rcon, solve_singularity_handler sing_handler,
2253 return tmp.
solve (b, info, rcon, sing_handler, transt);
2262 return lssolve (b, info, rank, rcon);
2270 return lssolve (b, info, rank, rcon);
2278 return lssolve (b, info, rank, rcon);
2294 (
"matrix dimension mismatch solution of linear equations");
2295 else if (m == 0 || n == 0 || b.
cols () == 0)
2308 retval.
elem (i, j) = b.
elem (i, j);
2335 m, n, nrhs, -1, mnthr
2341 float dminmn =
static_cast<float> (minmn);
2342 float dsmlsizp1 =
static_cast<float> (smlsiz+1);
2343 #if defined (HAVE_LOG2)
2344 float tmp = log2 (dminmn / dsmlsizp1);
2346 float tmp = log (dminmn / dsmlsizp1) / log (2.0);
2358 F77_XFCN (sgelsd, SGELSD, (m, n, nrhs, tmp_data, m, pretval, maxmn,
2360 lwork, piwork, info));
2366 if (n > m && n >= mnthr)
2369 = 9*m + 2*m*smlsiz + 8*m*nlvl + m*nrhs + (smlsiz+1)*(smlsiz+1);
2382 if (wlalsd > addend)
2387 if (work(0) < lworkaround)
2388 work(0) = lworkaround;
2393 = 12*n + 2*n*smlsiz + 8*n*nlvl + n*nrhs + (smlsiz+1)*(smlsiz+1);
2395 if (work(0) < lworkaround)
2396 work(0) = lworkaround;
2402 F77_XFCN (sgelsd, SGELSD, (m, n, nrhs, tmp_data, m, pretval,
2403 maxmn, ps, rcon, rank,
2407 if (s.
elem (0) == 0.0)
2410 rcon = s.
elem (minmn - 1) / s.
elem (0);
2425 return tmp.
lssolve (b, info, rank, rcon);
2434 return tmp.
lssolve (b, info, rank, rcon);
2443 return tmp.
lssolve (b, info, rank, rcon);
2451 return tmp.
lssolve (b, info, rank, rcon);
2460 return lssolve (b, info, rank, rcon);
2468 return lssolve (b, info, rank, rcon);
2476 return lssolve (b, info, rank, rcon);
2492 (
"matrix dimension mismatch solution of linear equations");
2493 else if (m == 0 || n == 0)
2532 float dminmn =
static_cast<float> (minmn);
2533 float dsmlsizp1 =
static_cast<float> (smlsiz+1);
2534 #if defined (HAVE_LOG2)
2535 float tmp = log2 (dminmn / dsmlsizp1);
2537 float tmp = log (dminmn / dsmlsizp1) / log (2.0);
2549 F77_XFCN (sgelsd, SGELSD, (m, n, nrhs, tmp_data, m, pretval, maxmn,
2551 lwork, piwork, info));
2556 F77_XFCN (sgelsd, SGELSD, (m, n, nrhs, tmp_data, m, pretval,
2557 maxmn, ps, rcon, rank,
2563 if (s.
elem (0) == 0.0)
2566 rcon = s.
elem (minmn - 1) / s.
elem (0);
2582 return tmp.
lssolve (b, info, rank, rcon);
2592 return tmp.
lssolve (b, info, rank, rcon);
2601 return tmp.
lssolve (b, info, rank, rcon);
2609 return tmp.
lssolve (b, info, rank, rcon);
2621 if (nr != a_nr || nc != a_nc)
2642 if (nr != a_nr || nc != a_nc)
2683 len, a_len, 1, 1.0, v.
data (), len,
2684 a.
data (), 1, 0.0, c, len
2750 float val =
elem (i);
2776 return do_mx_red_op<bool, float> (*
this, dim,
mx_inline_all);
2782 return do_mx_red_op<bool, float> (*
this, dim,
mx_inline_any);
2806 return do_mx_red_op<float, float> (*
this, dim,
mx_inline_sum);
2818 return do_mx_unary_map<float, float, std::abs> (*this);
2835 if (nr == 1 || nc == 1)
2839 (
"diag: expecting vector argument");
2859 if (nr > 0 && nc > 0)
2870 for (idx_j = 0; idx_j < nc; idx_j++)
2872 tmp_min =
elem (i, idx_j);
2880 float tmp =
elem (i, j);
2884 else if (tmp < tmp_min)
2891 result.
elem (i) = tmp_min;
2892 idx_arg.
elem (i) =
xisnan (tmp_min) ? 0 : idx_j;
2914 if (nr > 0 && nc > 0)
2925 for (idx_j = 0; idx_j < nc; idx_j++)
2927 tmp_max =
elem (i, idx_j);
2935 float tmp =
elem (i, j);
2939 else if (tmp > tmp_max)
2946 result.
elem (i) = tmp_max;
2947 idx_arg.
elem (i) =
xisnan (tmp_max) ? 0 : idx_j;
2969 if (nr > 0 && nc > 0)
2980 for (idx_i = 0; idx_i < nr; idx_i++)
2982 tmp_min =
elem (idx_i, j);
2990 float tmp =
elem (i, j);
2994 else if (tmp < tmp_min)
3001 result.
elem (j) = tmp_min;
3002 idx_arg.
elem (j) =
xisnan (tmp_min) ? 0 : idx_i;
3024 if (nr > 0 && nc > 0)
3035 for (idx_i = 0; idx_i < nr; idx_i++)
3037 tmp_max =
elem (idx_i, j);
3045 float tmp =
elem (i, j);
3049 else if (tmp > tmp_max)
3056 result.
elem (j) = tmp_max;
3057 idx_arg.
elem (j) =
xisnan (tmp_max) ? 0 : idx_i;
3085 if (nr > 0 && nc > 0)
3091 tmp = octave_read_value<float> (is);
3093 a.
elem (i, j) = tmp;
3107 float cc, s, temp_r;
3109 F77_FUNC (slartg, SLARTG) (
x, y, cc, s, temp_r);
3158 1, a_nr, b_nr, pa, a_nr, pb,
3159 b_nr, px, a_nr, scale, info
3195 return trans ?
'T' :
'N';
3218 if (a_nr == 0 || a_nc == 0 || b_nc == 0)
3220 else if (a.
data () == b.
data () && a_nr == b_nc && tra != trb)
3231 a.
data (), lda, 0.0, c, a_nr
3234 for (
int j = 0; j < a_nr; j++)
3235 for (
int i = 0; i < j; i++)
3255 lda, tda, 1.0, a.
data (), lda,
3256 b.
data (), 1, 0.0, c, 1
3264 ldb, tdb, 1.0, b.
data (), ldb,
3265 a.
data (), 1, 0.0, c, 1
3274 a_nr, b_nc, a_nc, 1.0, a.
data (),
3275 lda, b.
data (), ldb, 0.0, c, a_nr
3288 return xgemm (a, b);
3293 #define EMPTY_RETURN_CHECK(T) \
3294 if (nr == 0 || nc == 0) \
3311 result (i, j) =
xmin (d, m (i, j));
3331 result (i, j) =
xmin (m (i, j), d);
3345 (*current_liboctave_error_handler)
3346 (
"two-arg min expecting args of same size");
3358 result (i, j) =
xmin (a (i, j), b (i, j));
3378 result (i, j) =
xmax (d, m (i, j));
3398 result (i, j) =
xmax (m (i, j), d);
3412 (*current_liboctave_error_handler)
3413 (
"two-arg max expecting args of same size");
3425 result (i, j) =
xmax (a (i, j), b (i, j));
3442 (
"linspace: vectors must be of equal length");
3446 retval.clear (m, n);
3448 retval(i, 0) = x1(i);
3451 float *delta = &retval(0, n-1);
3453 delta[i] = (x2(i) - x1(i)) / (n - 1);
3457 retval(i, j) = x1(i) + j*delta[i];
3460 retval(i, n-1) = x2(i);