From bug-octave-request at bevo dot che dot wisc dot edu Sat Nov 27 10:51:46 1999 Subject: not compatable with Matlab (matrix problem) From: Dirk Eddelbuettel To: Shengchao Li Cc: bug-octave at bevo dot che dot wisc dot edu Date: Sat, 27 Nov 1999 10:51:34 -0600 (CST) Shengchao> in matlab Shengchao> a=[1 2 Shengchao> 3 4]; Shengchao> b=[1 Shengchao> 2]; Shengchao> c=[a (1+1)*b] Shengchao> gives Shengchao> c=[1 2 2 Shengchao> 3 4 4] Shengchao> but octave gives an error message. But b is a row vector. How can that work? It works for me with a) the --braindead option for increases Matlabness (on treatment of whitespace etc) and b) a transposition on the b vector: edd at sonny:~> octave --braindead -q >> a=[1 2; 3 4]; b = [1 2]; c = [a (1+1)*b'] c = 1.00000 2.00000 2.00000 3.00000 4.00000 4.00000 as well as in normal mode if you c) add some commata: edd at sonny:~> octave -q octave:1> a=[1, 2; 3, 4]; b = [1, 2]; c = [a , (1+1)*b'] c = 1 2 2 3 4 4 Finally, and just to clarify, nobody ever claimed that Octave's goal was to be perfectly Matlab compatible. If you want Matlab, you know where to get it ... -- According to the latest figures, 43% of all statistics are totally worthless. ----------------------------------------------------------------------- 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 -----------------------------------------------------------------------