Re: Matrix is singular to working precision
- From: "Tim Davis" <davis@xxxxxxxxxxxx>
- Date: Sun, 16 Sep 2007 23:49:50 +0000 (UTC)
"kalyan goutham" <kalyan_goutham@xxxxxxxxxxxxx> wrote in
message <fcikj8$sbi$1@xxxxxxxxxxxxxxxxxx>...
i have to perform the inverse of a matrix which may turn out
to be singular in the subsequent loops.i donot know how to
avoid this problem.i cannot use the linear system of euation
since the inverse of the matrix is required for the
calculation of density function.could yo please help me find
the solution.
is there a way to avoid the NAN numbers.
Can you provide a link to the relevant background from
computing the density function, or can you post the code
where you are trying to use inv? Or a subset of the code?
That is, if you do B=inv(A), I would like to see all the
code where you subsequently use B itself.
I'm guessing that you do not have to use the inverse. You
may see equations such as D = B*inv(A)*C, but that does not
mean that you should compute the inverse.
I'm guessing that you need to do, say, B*C where B=inv(A).
If that is correct, then you are making a mistake. Do not
multiply by the inverse. If you want inv(A)*C then use A\C
instead. If you want C*inv(A) then use C/A instead.
If the matrix is singular, then perhaps you need to
reformulate the problem as a least squares problem. Or see
the PINV function.
.
- References:
- Re: Matrix is singular to working precision
- From: kalyan goutham
- Re: Matrix is singular to working precision
- Prev by Date: Re: Invalid MEX-file
- Next by Date: Re: Saving many matrices into one matrix
- Previous by thread: Re: Matrix is singular to working precision
- Next by thread: matlab compiler simulink
- Index(es):
Relevant Pages
|