From help-octave-request at che dot utexas dot edu Wed Jan 18 10:35:22 1995 Subject: I and J variables From: Eyal Doron To: help-octave at che dot utexas dot edu (Octave mailing list) Date: Wed, 18 Jan 1995 17:35:12 +0100 (MET) Hi, I know its a feature, but IMHO its an irritating one. I and J are defined as sqrt(-1), like i and j, except that they are read-only and can't be changed. This is playing havoc with some of my MATLAB functions, which usually use I as an index vector and J as a bessel function vector. I know its trivial to fix my files, but its bothersome nevertheless. Is there any way to remove this feature? BTW, I've just transferred a bessel function .m file from Matlab to Octave 1.1.0. I needed to change the I variable name, and I also got the warning: "warning: empty matrix found in matrix list" on the lines Ii=find(z); LI=length(Ii); Jn(:,Ii)=[ones(1,LI);zeros(n,LI)]; when "z" contained only zeros. It seemed to work OK, though. I think these warnings are superfluous, since empty matrices are not an error but a natural part of the language. Again, solved by enclosing the whole thing in an "if any(z)==1,...,end" block, which is however not necessary in Matlab. Nevertheless, I'm impressed. Bye, Eyal Doron