From bug-octave-request at che dot utexas dot edu Tue May 31 20:03:19 1994 From: John Eaton To: Frederick A Niles (Rick) cc: bug-octave at che dot utexas dot edu Date: Tue, 31 May 94 20:03:15 EDT Frederick (Rick) A Niles wrote: : Desirable Matlab features missing in Octave. : 1) octave_path like matlab_path for user defined *.m files. So they : don't all have to be in the current directory. You can use the built-in variable LOADPATH for this. It's described and indexed in the manual. : Perhaps a ~/.octave file would be appropriate. Octave already looks for the files ~/.octaverc and ./.octaverc in addition to the system-wide /usr/local/lib/octave/VERSION/octaverc. I don't think this is properly explained in the manual yet, but should be for 1.1. : 2) Optional parameters for functions. e.g. : function out=tester(in, a) : if(~exist('a')),a=1,end : a : out =1; In this case, the variable a does exist because it is in the function's symbol table. Apparenly Matlab makes it appear as though a function parameter doesn't exist if it is not given a value when the function is called. Perhaps this is reasonable, so I'll consider fixing it to work like Matlab. : 3) "load" of plain ASCII data files as one large array or group of vectors. : (I've written a .m file for this but it is extremely slow for : large (6 col, 5000 row) files.) This would fall under: : * Make load work for files saved by Matlab. I'm not sure what file format you are asking for. Octave can already read a matrix stored as ASCII data, but you have to provide the size and name of the variable in the header of the file. Something like: # name: a # type: matrix # rows: 5000 # columns: 2 0.58778941631317139 0.88879448175430298 0.81900960206985474 0.29288467764854431 ... Version 1.1 will have fread() and fwrite(), and may include support for binary reading and writing of data files with load and save. : 4) Why not alias 'whos' to 'who -l' for us Matlab users? That seems reasonable. : In addition, why can't one index arrays of characters, like C? : a = "apple" : then a(2) is --> 'p' This simply hasn't been implemented yet. It should be done for the next release. Thanks, jwe