42 :
Array<T> (a.as_column ()), d1 (r), d2 (c)
53 return extract_diag (k);
65 else if (k > 0 && k < cols ())
67 else if (k < 0 && -k < rows ())
71 (
"diag: requested diagonal out of range");
99 (*current_liboctave_error_handler) (
"can't resize to negative dimensions");
103 if (r != dim1 () || c != dim2 ())
117 result.
xelem (i, i) = dgelem (i);
122 template <
typename T>
128 if (r < 0 || r >= dim1 ())
134 if (c < 0 || c >= dim2 ())