From help-octave-request at bevo dot che dot wisc dot edu Tue Jan 11 17:59:08 2000 Subject: Rows in DLD functions From: Ben Sapp To: help-octave at bevo dot che dot wisc dot edu Date: Tue, 11 Jan 2000 16:59:05 -0700 Can any one tell me why the following DLD function prints a row vector but returns a column vector? I think it should print and return a column vector. Can you also tell me how I can return a Row vector instead of a column vector? rowvec_test.cc ------------------------------------------------------------------- #include #include DEFUN_DLD(rowvec_test,args, , "\nRow vector test\n"){ RowVector the_row = args(0).vector_value(); octave_stdout << "The Row vector = \n" << the_row << "\n"; return octave_value(the_row); } ------------------------------------------------------------------- Run it from octave like this: v = [ 1 2 3]; rowvec_test(v) Thanks. -- Ben Sapp Los Alamos National Laboratory email: Phone: (505)667-3277 Fax: (505)665-7920 URL: http://www.neutrino.lanl.gov/ -- ----------------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.che.wisc.edu/octave/octave.html How to fund new projects: http://www.che.wisc.edu/octave/funding.html Subscription information: http://www.che.wisc.edu/octave/archive.html -----------------------------------------------------------------------