Octave and Freemat

Ben Abbott bpabbott at mac.com
Tue Mar 4 19:27:14 CST 2008


On Mar 4, 2008, at 6:46 PM, Sebastien Loisel wrote:

> Dear David,
>
> Thank you for your email.
>
> On Tue, Mar 4, 2008 at 5:44 PM, David Bateman <David.Bateman at motorola.com 
> > wrote:
> f = find (p ./ max(p));
> p = p (f(1):end);
>
> Are you missing an abs maybe? Also, I hope you did your checking for  
> nans and infs before you got there.
>
> -- 
> Sébastien Loisel


To respect Matlab an error should result when NaNs or Infs are present.

The abs shouldn't be necessary. In fact, if NaNs and Infs have already  
be handled, why not

f = find (p);
p = p(f(1):end);
n = numel (p)-1;
A = diag (ones (n-1, 1), -1);
A(1,:) = -p(2:n+1) ./ p(1);
z = eig (A);

Ben


More information about the Octave-maintainers mailing list