On question 2, make sure warnings are not switched off
in your program.
Navan
--- Lan Wang <> wrote: > Hi Folks,
>
> As a new user of Matlab, I'm puzzled by the
> following two questions:
>
> 1. I typed "realmin" in the command window and it
> gave me 2.2251e-308,
> but why did I get a matrix with a determinant
> equal to
> 5.434722e-322? I used "fprintf("%e", d)" to print
> the determinant.
>
> 2. In my result, DETERMINANT = 0.000000E+000
> occurred for a
> matrix, which is zero in Matlab (and I verified
> it), why was there no
> error message, nor warning, coming up when the
> matrix with this
> determinant was inverted in my program? (But in
> the command
> window, when I tried to invert an obvioulsy
> singular matrix, the error
> message "Warning: Matrix is singular to working
> precision." showed
> up.)
>
> Many thanks.
>
> Richard
__________________________________
Reply by Pavel Jiranek●July 6, 20032003-07-06
Make sure if you're working with single or double precission. Paya
Lan Wang wrote:
>Hi Folks,
>
>As a new user of Matlab, I'm puzzled by the following two questions:
>
>1. I typed "realmin" in the command window and it gave me
2.2251e-308,
> but why did I get a matrix with a determinant equal to
> 5.434722e-322? I used "fprintf("%e", d)" to print the
determinant.
>
>2. In my result, DETERMINANT = 0.000000E+000 occurred for a
> matrix, which is zero in Matlab (and I verified it), why was there no
> error message, nor warning, coming up when the matrix with this
> determinant was inverted in my program? (But in the command
> window, when I tried to invert an obvioulsy singular matrix, the error
> message "Warning: Matrix is singular to working precision."
showed
> up.)
>
>Many thanks.
>
>Richard
Reply by Nandakishore Ramaswamy●July 6, 20032003-07-06
Regarding your 2nd question the warning does show up but the answer comes up
as
"Inf" which I suppose is infinity.
-Nandakishore
Lan Wang <> wrote:Hi Folks,
As a new user of Matlab, I'm puzzled by the following two questions:
1. I typed "realmin" in the command window and it gave me
2.2251e-308,
but why did I get a matrix with a determinant equal to
5.434722e-322? I used "fprintf("%e", d)" to print the
determinant.
2. In my result, DETERMINANT = 0.000000E+000 occurred for a
matrix, which is zero in Matlab (and I verified it), why was there no
error message, nor warning, coming up when the matrix with this
determinant was inverted in my program? (But in the command
window, when I tried to invert an obvioulsy singular matrix, the error
message "Warning: Matrix is singular to working precision." showed
up.)
Many thanks.
Richard
_____________________________________
Note: If you do a simple "reply" with your email client, only the
author of this
message will receive your answer. You need to do a "reply all" if you
want your
answer to be distributed to the entire group.
_____________________________________
About this discussion group:
As a new user of Matlab, I'm puzzled by the following two questions:
1. I typed "realmin" in the command window and it gave me
2.2251e-308,
but why did I get a matrix with a determinant equal to
5.434722e-322? I used "fprintf("%e", d)" to print the
determinant.
2. In my result, DETERMINANT = 0.000000E+000 occurred for a
matrix, which is zero in Matlab (and I verified it), why was there no
error message, nor warning, coming up when the matrix with this
determinant was inverted in my program? (But in the command
window, when I tried to invert an obvioulsy singular matrix, the error
message "Warning: Matrix is singular to working precision." showed
up.)