From bug-octave-request at che dot utexas dot edu Sat May 21 20:37:51 1994 Subject: diag([]) From: Ken Neighbors To: bug-octave at che dot utexas dot edu (Octave Bug) Date: Sat, 21 May 1994 18:37:48 -0700 (PDT) I'm running Octave 1.0 under Linux 0.99.15 #1 Thu Feb 3 19:55:32 CST 1994 from Slackware 1.1.2 on my 486DX33. (In my ongoing quest to get the MATLAB controls toolbox to run under Octave) Note: I have not changed the default value of propagate_empty_matrices='true'. (1) "diag([])" should return [], but it generates an error. (2) "diag([],-1)" returns [], which is compatible with MATLAB, but it prints a warning message and it would be nice to be able to turn off this message so I don't see it all the time. Maybe if "empty_list_elements_ok" is TRUE, then diag shouldn't print the message. Ken Neighbors wkn at leland dot stanford dot edu P.S. I successfully compiled Octave on my Linux box, and so now I can actually use all those patches you've been sending. Thanks. My octaverc is: *************** beginning of octaverc ***************** # octave's system startup file # set load path LOADPATH=['.:/usr/local/lib/octave/hacks:/usr/local/lib/octave/1.0' ... ':/usr/local/lib/matlab/hacks' ... ':/usr/local/lib/matlab/controls:/usr/local/lib/matlab/matlab']; # make octave matlab compatible: do_fortran_indexing = 'true'; treat_neg_dim_as_zero = 'true'; empty_list_elements_ok = 'true'; *************** end of octaverc ***************** *************** beginning of log ***************** Octave, version 1.0. Copyright (C) 1992, 1993, 1994 John W. Eaton. This is free software with ABSOLUTELY NO WARRANTY. For details, type `warranty'. octave:1> propagate_empty_matrices propagate_empty_matrices = true octave:2> a = diag([]) diag: requested diagonal out of range octave:3> a error: `a' undefined near line 3 column 1 error: evaluating expression near line 3, column 1 octave:4> a = diag([],-1) diag: requested diagonal out of range a = [](0x1) octave:5> *************** end of log *****************