[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Zero or not?
From: |
Bob Weigel |
Subject: |
Re: Zero or not? |
Date: |
Sat, 21 Jul 2007 09:36:18 -0400 |
User-agent: |
KMail/1.8.2 |
On Saturday 21 July 2007 08:50, Matthias Brennwald wrote:
> Dear all
>
> I expected the below code to yield only zeros, but it does not:
>
> ----------------------------
> u = [ 0 , 1e-3 , 1e-4 ; 1e-3 , 0 , 0 ; 0 , 1e-4 , 0 ];
> d = u - diag(sum(u));
> sum(d)
> ----------------------------
>
> The output is:
> 0.0000e+00 -4.0658e-20 0.0000e+00
>
> Why is this? Is there something I can do to 'fix' this?
>
This is correct.
See
http://docs.sun.com/app/docs/doc/800-7895
or
http://www.nabble.com/forum/Search.jtp?forum=1895&local=y&query=goldberg
- Re: Zero or not?, (continued)
- Re: Zero or not?, Francesco Potorti`, 2007/07/22
- Re: Zero or not?, Miroslaw Kwasniak, 2007/07/23
- Re: Zero or not?, Francesco Potorti`, 2007/07/23
- Re: Zero or not?, kensmith, 2007/07/23
- Re: Zero or not?, Przemek Klosowski, 2007/07/23
- Re: Zero or not?, Robert A. Macy, 2007/07/21
Re: Zero or not?,
Bob Weigel <=