[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Zero or not?
From: |
Matthias Brennwald |
Subject: |
Zero or not? |
Date: |
Sat, 21 Jul 2007 14:50:59 +0200 |
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?
Matthias
-------
Matthias Brennwald
Lägernstrasse 6
CH 8037 Zürich
+41 (0)44 364 17 03
address@hidden
- Zero or not?,
Matthias Brennwald <=
- Re: Zero or not?, Jordi Gutiérrez Hermoso, 2007/07/21
- Re: Zero or not?, Matthias Brennwald, 2007/07/21
- Re: Zero or not?, Ben Abbott, 2007/07/21
- Re: Zero or not?, Matthias Brennwald, 2007/07/22
- Re: Zero or not?, James Sherman Jr., 2007/07/22
- Re: Zero or not?, Matthias Brennwald, 2007/07/23
- Re: Zero or not?, Francesco Potorti`, 2007/07/23
- Re: Zero or not?, James Sherman Jr., 2007/07/23
- Re: Zero or not?, Miroslaw Kwasniak, 2007/07/23
- Re: Zero or not?, Francesco Potorti`, 2007/07/24