Re: Matrix is singular to working precision



"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.
.



Relevant Pages

  • Re: OT Lets take a leisurely drive down the streets of Baghdad
    ... That would be a blast to be able to drive like that. ... I am guessing they have ... to do that to avoid some prick running out and tossing a bomb at them. ... of torque. ...
    (rec.music.makers.percussion)
  • Re: OT Lets take a leisurely drive down the streets of Baghdad
    ... That would be a blast to be able to drive like that. ... I am guessing they have ... to do that to avoid some prick running out and tossing a bomb at them. ... of torque. ...
    (rec.music.makers.percussion)
  • Re: override the message of last login
    ... Atropo wrote: ... how can I avoid this message from being ... I'm guessing, but I suspect you mean the message that you see when you ...
    (comp.unix.shell)
  • Re: The Census ???
    ... guessing the tin-foil hat crowd  would have a field day with it. ... if only to avoid an annoying personal visit. ...  They also determine how many representatives each state gets to congress ...
    (alt.sports.baseball.bos-redsox)
  • Re: Who, Their, His, Her
    ... Panel is quite representative. ... The abusers are simply folk faced with ... The number of miscalled "singular they" uses where the ... in speech but avoid it in writing.) ...
    (alt.usage.english)