function octave_mistake_test06 ( )

%*****************************************************************************80
%
%% octave_mistake_test06(): a vector dotted with itself becomes...a matrix.
%
%  Discussion:
%
%    The rand() function can return a scalar, vector, or matrix.  
%    * rand() or rand(1) returns a scalar.
%    * rand(3,2) returns a 3x2 matrix.
%
%    It might be natural to assume that rand(3) returns a vector of length 3.  
%    It doesn't.  As a convenience 
%    to lazy typists, rand(3) returns a 3x3 matrix of random values.
%
%    Being wrong about the dimensions of an object is a common and deadly
%    error.  Once we have created a matrix instead of a vector,
%    nothing else is going to work for us.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    09 February 2019
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'octave_mistake_test06():\n' );
  fprintf ( 1, '  v=rand(3) does NOT return a vector.\n' );
  fprintf ( 1, '  So vdotv-v''*v does NOT return a scalar!\n' );

  fprintf ( 1, '\n' );
  fprintf ( 1, '  v = rand ( 3 )  %%  NOT a 3-vector!\n' );

  v = rand ( 3 )

  fprintf ( 1, '\n' );
  fprintf ( 1, '  vdotv = v''*v  %%  NOT a scalar!\n' );

  vdotv = v' * v

  return
end

