33 template <
class ColumnVector,
class Matrix,
class RowVector>
51 DEFUN (mgorth, args, nargout,
53 @deftypefn {Built-in Function} {[@var{y}, @var{h}] =} mgorth (@var{x}, @var{v})\n\
54 Orthogonalize a given column vector @var{x} with respect to a set of\n\
55 orthonormal vectors comprising the columns of @var{v} using the modified\n\
56 Gram-Schmidt method.\n\
58 On exit, @var{y} is a unit vector such that:\n\
63 @var{v}' * @var{y} = 0\n\
64 @var{x} = [@var{v}, @var{y}]*@var{h}'\n\
72 int nargin = args.
length ();
74 if (nargin != 2 || nargout > 2)
86 error (
"mgorth: V should be a matrix, and X a column vector with"
87 " the same number of rows as V.");
93 error (
"mgorth: X and V must be numeric");
ColumnVector column_vector_value(bool frc_str_conv=false, bool frc_vec_conv=false) const
octave_idx_type rows(void) const
FloatComplexMatrix float_complex_matrix_value(bool frc_str_conv=false) const
FloatColumnVector float_column_vector_value(bool frc_str_conv=false, bool frc_vec_conv=false) const
OCTINTERP_API void print_usage(void)
octave_idx_type length(void) const
bool is_numeric_type(void) const
#define DEFUN(name, args_name, nargout_name, doc)
void error(const char *fmt,...)
static void do_mgorth(ColumnVector &x, const Matrix &V, RowVector &h)
octave_idx_type columns(void) const
bool is_complex_type(void) const
OCTAVE_API double xnorm(const ColumnVector &x, double p)
Matrix matrix_value(bool frc_str_conv=false) const
MArray< T > hermitian(T(*fcn)(const T &)=0) const
F77_RET_T const octave_idx_type const octave_idx_type const octave_idx_type const double const double octave_idx_type double * V
ComplexMatrix complex_matrix_value(bool frc_str_conv=false) const
FloatComplexColumnVector float_complex_column_vector_value(bool frc_str_conv=false, bool frc_vec_conv=false) const
FloatMatrix float_matrix_value(bool frc_str_conv=false) const
ColumnVector column(octave_idx_type i) const
ComplexColumnVector complex_column_vector_value(bool frc_str_conv=false, bool frc_vec_conv=false) const
bool is_single_type(void) const
ColumnVector real(const ComplexColumnVector &a)
octave_idx_type columns(void) const
F77_RET_T const double * x