From bug-octave-request at bevo dot che dot wisc dot edu Mon Sep 25 19:54:11 1995 Subject: norm() incopatibility with matlab From: Michael Smolsky To: bug-octave at che dot utexas dot edu Date: Tue, 26 Sep 1995 01:45:00 +0300 (IST) Hi Thanks a lot for supporting such a great and free tool! I found a noncompatibility between octave and matlab norm functions. Matlab's norm can accept arguments like norm([1,0],"inf"), while octave's norm can only crunch norm([1,0],inf), that is it can't take inf as a string. If that is the incopatibility which is found in most other functions, I'd suggest to include the following in the octave distribution: function p=strinf(x) #test whether x="Inf" or x="inf" or x="INF" p=(isstr(x) && (x=="inf" || x=="Inf" || x=="INF")); end and in all the functions, where one of the arguments can be "Inf" (string) to add: if (nargin == 2 & strinf (p)) p = inf; (p is the suspected argument, and nargin == 2 tests whether this argument is defined). Good luck in future development, MSi