help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: I and J variables


From: John Eaton
Subject: Re: I and J variables
Date: Wed, 18 Jan 95 10:49:21 CST

Eyal Doron <address@hidden> wrote:

: 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.

You can turn this warning off by setting the built-in variable

  empty_list_elements_ok = "true"

The default value is "warn".  You can also make it invalid to have an
empty matrix in a matrix list by setting the variable to "false".

jwe


reply via email to

[Prev in Thread] Current Thread [Next in Thread]