Skip to Main Content Skip to Search
Login
File Exchange
MATLAB Newsgroup
Link Exchange
  Blogs  
 Contest 
MathWorks.com

Thread Subject: inverse of sparse matrix

Subject: inverse of sparse matrix

From: Gulcin M Muslu

Date: 3 Jul, 2008 07:49:01

Message: 1 of 16

 Hi all,

I need to find the inverse of a very large sparse matrix.
The size of the matrix is 360000.
The problem is that Matlab yields : "Out of memory" ,when I
use B=inv(A);
I tried to find the inverse of A by using the command
C=A\speye(360000). But C*A is not equal to identity matrix.
Why it is not working?
If somebody knows how to I find the inverse of sparse
large matrix simply, please help me.
Thanks.



Subject: inverse of sparse matrix

From: Nitin Chhabra

Date: 3 Jul, 2008 09:22:02

Message: 2 of 16

"Gulcin M Muslu" <gulcinmuslu@gmail.com> wrote in message
<g4i09d$aki$1@fred.mathworks.com>...
> Hi all,
>
> I need to find the inverse of a very large sparse matrix.
> The size of the matrix is 360000.
> The problem is that Matlab yields : "Out of memory" ,when
I
> use B=inv(A);
> I tried to find the inverse of A by using the command
> C=A\speye(360000). But C*A is not equal to identity
matrix.
> Why it is not working?
> If somebody knows how to I find the inverse of sparse
> large matrix simply, please help me.
> Thanks.
>
>
>
 
Hi,

Try this if it works:

S=sparse(A)
C=inv(S)
B=full(C)

with regards,
Nitin

Subject: inverse of sparse matrix

From: Titus

Date: 3 Jul, 2008 09:28:51

Message: 3 of 16


"Gulcin M Muslu" <gulcinmuslu@gmail.com> schrieb im Newsbeitrag
news:g4i09d$aki$1@fred.mathworks.com...
> Hi all,
>
> I need to find the inverse of a very large sparse matrix.
> The size of the matrix is 360000.
> The problem is that Matlab yields : "Out of memory" ,when I
> use B=inv(A);
> I tried to find the inverse of A by using the command
> C=A\speye(360000). But C*A is not equal to identity matrix.
> Why it is not working?
> If somebody knows how to I find the inverse of sparse
> large matrix simply, please help me.
> Thanks.
>
>
>

Hi,
first of all, keep in mind that in general the inverse of a sparse is not
sparse. Second, what do you need the inverse for? Solving linear systems of
equations? In this case use \ instead of computing the inverse.

Titus


Subject: inverse of sparse matrix

From: Gulcin M Muslu

Date: 3 Jul, 2008 11:33:01

Message: 4 of 16


 Hi,
 A is a large sparse matrix. But when I write the command
 C=inv(A), I get the message which is " Out of memory..."
 So it is not working. Thanks.


"Nitin Chhabra" <nitin.chhabra@st.com> wrote in message
<g4i5nq$1v0$1@fred.mathworks.com>...
> "Gulcin M Muslu" <gulcinmuslu@gmail.com> wrote in
message
> <g4i09d$aki$1@fred.mathworks.com>...
> > Hi all,
> >
> > I need to find the inverse of a very large sparse
matrix.
> > The size of the matrix is 360000.
> > The problem is that Matlab yields : "Out of
memory" ,when
> I
> > use B=inv(A);
> > I tried to find the inverse of A by using the command
> > C=A\speye(360000). But C*A is not equal to identity
> matrix.
> > Why it is not working?
> > If somebody knows how to I find the inverse of sparse
> > large matrix simply, please help me.
> > Thanks.
> >
> >
> >
>
> Hi,
>
> Try this if it works:
>
> S=sparse(A)
> C=inv(S)
> B=full(C)
>
> with regards,
> Nitin

Subject: inverse of sparse matrix

From: vedenev

Date: 3 Jul, 2008 12:36:00

Message: 5 of 16

Follow for how matlab get memory in Windows task manager, virtual
memory is imortant. Increase pagefile size. My comuter => properties
=> advanced => perfomance => advanced => vertual memory. Set for
example 3000 MB. At windows at 32bit computer about 3000 MB is maximal
posible to get. So for invertion of big matricies you need 64 bit
comuter.

------------------------------------
Maxim Vedenev, Matlab freelancer
http://simulations.narod.ru/

Subject: inverse of sparse matrix

From: Tim Davis

Date: 3 Jul, 2008 20:31:02

Message: 6 of 16

"Gulcin M Muslu" <gulcinmuslu@gmail.com> wrote in message
<g4i09d$aki$1@fred.mathworks.com>...
> Hi all,
>
> I need to find the inverse of a very large sparse matrix.
> The size of the matrix is 360000.
> The problem is that Matlab yields : "Out of memory" ,when I
> use B=inv(A);
> I tried to find the inverse of A by using the command
> C=A\speye(360000). But C*A is not equal to identity matrix.
> Why it is not working?
> If somebody knows how to I find the inverse of sparse
> large matrix simply, please help me.
> Thanks.
>
>
>

The solution is to never ever to compute the inverse of a
sparse matrix.

If dmperm reports that the matrix is a single block (nblocks
= length(r)-1 from the r output of dmperm) then your inverse
will be completely nonzero. The largest block of size
max(diff(r)) will be dense, if nblocks > 1. If that is
large, then it's hopeless trying to invert your sparse matrix.

If you are wanting to multiply by the inverse of a sparse
matrix, then use backslash instead.


Subject: inverse of sparse matrix

From: Gulcin M Muslu

Date: 4 Jul, 2008 13:06:02

Message: 7 of 16


   Dear Prof. Davis,
 
 Thank you for your suggestions.
 To find the inverse of large sparse matrix A which is
360000*360000, I use the command

 >> B= A \speye(360000)
 But I get the error message

 ??? Error using ==> mldivide
Out of memory. Type HELP MEMORY for your options.
 
 How can I solve this problem?
 Thanks.
 

Thanks for suggestions.

"Tim Davis" <davis@cise.ufl.edu> wrote in message <g4jcu6
$jnl$1@fred.mathworks.com>...
> "Gulcin M Muslu" <gulcinmuslu@gmail.com> wrote in message
> <g4i09d$aki$1@fred.mathworks.com>...
> > Hi all,
> >
> > I need to find the inverse of a very large sparse
matrix.
> > The size of the matrix is 360000.
> > The problem is that Matlab yields : "Out of
memory" ,when I
> > use B=inv(A);
> > I tried to find the inverse of A by using the command
> > C=A\speye(360000). But C*A is not equal to identity
matrix.
> > Why it is not working?
> > If somebody knows how to I find the inverse of sparse
> > large matrix simply, please help me.
> > Thanks.
> >
> >
> >
>
> The solution is to never ever to compute the inverse of a
> sparse matrix.
>
> If dmperm reports that the matrix is a single block
(nblocks
> = length(r)-1 from the r output of dmperm) then your
inverse
> will be completely nonzero. The largest block of size
> max(diff(r)) will be dense, if nblocks > 1. If that is
> large, then it's hopeless trying to invert your sparse
matrix.
>
> If you are wanting to multiply by the inverse of a sparse
> matrix, then use backslash instead.
>
>

Subject: inverse of sparse matrix

From: Titus

Date: 4 Jul, 2008 13:16:59

Message: 8 of 16

Dear Gulcin,

sorry for the next question, but: have you read one of the many replies to
your question? Repeating the same question will likely result in the same
answer...
Several people now have asked why you want to compute the inverse (and told
you not to do so)...

Titus


"Gulcin M Muslu" <gulcinmuslu@gmail.com> schrieb im Newsbeitrag
news:g4l77q$1lo$1@fred.mathworks.com...
>
> Dear Prof. Davis,
>
> Thank you for your suggestions.
> To find the inverse of large sparse matrix A which is
> 360000*360000, I use the command
>
> >> B= A \speye(360000)
> But I get the error message
>
> ??? Error using ==> mldivide
> Out of memory. Type HELP MEMORY for your options.
>
> How can I solve this problem?
> Thanks.
>
>
> Thanks for suggestions.
>
> "Tim Davis" <davis@cise.ufl.edu> wrote in message <g4jcu6
> $jnl$1@fred.mathworks.com>...
>> "Gulcin M Muslu" <gulcinmuslu@gmail.com> wrote in message
>> <g4i09d$aki$1@fred.mathworks.com>...
>> > Hi all,
>> >
>> > I need to find the inverse of a very large sparse
> matrix.
>> > The size of the matrix is 360000.
>> > The problem is that Matlab yields : "Out of
> memory" ,when I
>> > use B=inv(A);
>> > I tried to find the inverse of A by using the command
>> > C=A\speye(360000). But C*A is not equal to identity
> matrix.
>> > Why it is not working?
>> > If somebody knows how to I find the inverse of sparse
>> > large matrix simply, please help me.
>> > Thanks.
>> >
>> >
>> >
>>
>> The solution is to never ever to compute the inverse of a
>> sparse matrix.
>>
>> If dmperm reports that the matrix is a single block
> (nblocks
>> = length(r)-1 from the r output of dmperm) then your
> inverse
>> will be completely nonzero. The largest block of size
>> max(diff(r)) will be dense, if nblocks > 1. If that is
>> large, then it's hopeless trying to invert your sparse
> matrix.
>>
>> If you are wanting to multiply by the inverse of a sparse
>> matrix, then use backslash instead.
>>
>>
>


Subject: inverse of sparse matrix

From: Gulcin M Muslu

Date: 4 Jul, 2008 14:09:01

Message: 9 of 16


 Dear Titus,

 I would like to solve linear algebraic system
 as follows:
 
 Ax+ By= C
 Dx+ Ey= F
 
 If I multiply the first eq. by inv(A) and the
 second eq. by inv(D), then I get the linear system
 
 [inv(D)*E-inv(A)*B ] y= [inv(D)*F-inv(A)*C ]

 So I need the inverses of some matrices. As you
 said before, the inverse of sparse matrix is not
 sparse matrix in general. So I don't use the
 command inv(A). I use the backslash operator
 to calculate the inverse of A
   A\speye(360000)

 But I get the error message

   ??? Error using ==> mldivide
Out of memory. Type HELP MEMORY for your options.
 
 How can I solve this problem?
 Thanks

"Titus" <titus.edelhofer@mathworks.de> wrote in message
<g4l7sc$8qn$1@fred.mathworks.com>...
> Dear Gulcin,
>
> sorry for the next question, but: have you read one of
the many replies to
> your question? Repeating the same question will likely
result in the same
> answer...
> Several people now have asked why you want to compute
the inverse (and told
> you not to do so)...
>
> Titus
>
>
> "Gulcin M Muslu" <gulcinmuslu@gmail.com> schrieb im
Newsbeitrag
> news:g4l77q$1lo$1@fred.mathworks.com...
> >
> > Dear Prof. Davis,
> >
> > Thank you for your suggestions.
> > To find the inverse of large sparse matrix A which is
> > 360000*360000, I use the command
> >
> > >> B= A \speye(360000)
> > But I get the error message
> >
> > ??? Error using ==> mldivide
> > Out of memory. Type HELP MEMORY for your options.
> >
> > How can I solve this problem?
> > Thanks.
> >
> >
> > Thanks for suggestions.
> >
> > "Tim Davis" <davis@cise.ufl.edu> wrote in message
<g4jcu6
> > $jnl$1@fred.mathworks.com>...
> >> "Gulcin M Muslu" <gulcinmuslu@gmail.com> wrote in
message
> >> <g4i09d$aki$1@fred.mathworks.com>...
> >> > Hi all,
> >> >
> >> > I need to find the inverse of a very large sparse
> > matrix.
> >> > The size of the matrix is 360000.
> >> > The problem is that Matlab yields : "Out of
> > memory" ,when I
> >> > use B=inv(A);
> >> > I tried to find the inverse of A by using the
command
> >> > C=A\speye(360000). But C*A is not equal to identity
> > matrix.
> >> > Why it is not working?
> >> > If somebody knows how to I find the inverse of
sparse
> >> > large matrix simply, please help me.
> >> > Thanks.
> >> >
> >> >
> >> >
> >>
> >> The solution is to never ever to compute the inverse
of a
> >> sparse matrix.
> >>
> >> If dmperm reports that the matrix is a single block
> > (nblocks
> >> = length(r)-1 from the r output of dmperm) then your
> > inverse
> >> will be completely nonzero. The largest block of size
> >> max(diff(r)) will be dense, if nblocks > 1. If that
is
> >> large, then it's hopeless trying to invert your sparse
> > matrix.
> >>
> >> If you are wanting to multiply by the inverse of a
sparse
> >> matrix, then use backslash instead.
> >>
> >>
> >
>
>

Subject: inverse of sparse matrix

From: John D'Errico

Date: 4 Jul, 2008 14:22:01

Message: 10 of 16

"Gulcin M Muslu" <gulcinmuslu@gmail.com> wrote in message
<g4latt$9ko$1@fred.mathworks.com>...
>
> Dear Titus,
>
> I would like to solve linear algebraic system
> as follows:
>
> Ax+ By= C
> Dx+ Ey= F
>
> If I multiply the first eq. by inv(A) and the
> second eq. by inv(D), then I get the linear system
>
> [inv(D)*E-inv(A)*B ] y= [inv(D)*F-inv(A)*C ]
>
> So I need the inverses of some matrices. As you
> said before, the inverse of sparse matrix is not
> sparse matrix in general. So I don't use the
> command inv(A). I use the backslash operator
> to calculate the inverse of A
> A\speye(360000)
>
> But I get the error message
>
> ??? Error using ==> mldivide
> Out of memory. Type HELP MEMORY for your options.
>
> How can I solve this problem?

A\speye(360000)

still generates the inverse. You are just
kidding yourself.

Your problem is really to solve

  G*Z = H

where

  G = [A,B;D,E]
  Z = [X;Y]
  H = [C;F]

So if G is sparse enough, then you might be
able to do it as

  Z = G\H

If not, then use an iterative solver.

HTH,
John

Subject: inverse of sparse matrix

From: Titus

Date: 4 Jul, 2008 14:29:00

Message: 11 of 16

H Gulcin,

O.K., first of all, the situation is exactly what all the replyers have
anticipated, namely, that solving systems of linear equations is what you
are after!

Let's see, what we can do. I hope, the dimensions of B and E are somewhat
smaller? Whereever you write inv(X)*Y you should replace by solving the
linear system(s) of equations, i.e., use X\Y.
Your reformulation of the system then looks like

(D\E - A\B) * y = (D\F - A\C)

and solve for y:

y = (D\E - A\B) \ (D\F-A\C)

Titus


"Gulcin M Muslu" <gulcinmuslu@gmail.com> schrieb im Newsbeitrag
news:g4latt$9ko$1@fred.mathworks.com...
>
> Dear Titus,
>
> I would like to solve linear algebraic system
> as follows:
>
> Ax+ By= C
> Dx+ Ey= F
>
> If I multiply the first eq. by inv(A) and the
> second eq. by inv(D), then I get the linear system
>
> [inv(D)*E-inv(A)*B ] y= [inv(D)*F-inv(A)*C ]
>
> So I need the inverses of some matrices. As you
> said before, the inverse of sparse matrix is not
> sparse matrix in general. So I don't use the
> command inv(A). I use the backslash operator
> to calculate the inverse of A
> A\speye(360000)
>
> But I get the error message
>
> ??? Error using ==> mldivide
> Out of memory. Type HELP MEMORY for your options.
>
> How can I solve this problem?
> Thanks
>
> "Titus" <titus.edelhofer@mathworks.de> wrote in message
> <g4l7sc$8qn$1@fred.mathworks.com>...
>> Dear Gulcin,
>>
>> sorry for the next question, but: have you read one of
> the many replies to
>> your question? Repeating the same question will likely
> result in the same
>> answer...
>> Several people now have asked why you want to compute
> the inverse (and told
>> you not to do so)...
>>
>> Titus
>>
>>
>> "Gulcin M Muslu" <gulcinmuslu@gmail.com> schrieb im
> Newsbeitrag
>> news:g4l77q$1lo$1@fred.mathworks.com...
>> >
>> > Dear Prof. Davis,
>> >
>> > Thank you for your suggestions.
>> > To find the inverse of large sparse matrix A which is
>> > 360000*360000, I use the command
>> >
>> > >> B= A \speye(360000)
>> > But I get the error message
>> >
>> > ??? Error using ==> mldivide
>> > Out of memory. Type HELP MEMORY for your options.
>> >
>> > How can I solve this problem?
>> > Thanks.
>> >
>> >
>> > Thanks for suggestions.
>> >
>> > "Tim Davis" <davis@cise.ufl.edu> wrote in message
> <g4jcu6
>> > $jnl$1@fred.mathworks.com>...
>> >> "Gulcin M Muslu" <gulcinmuslu@gmail.com> wrote in
> message
>> >> <g4i09d$aki$1@fred.mathworks.com>...
>> >> > Hi all,
>> >> >
>> >> > I need to find the inverse of a very large sparse
>> > matrix.
>> >> > The size of the matrix is 360000.
>> >> > The problem is that Matlab yields : "Out of
>> > memory" ,when I
>> >> > use B=inv(A);
>> >> > I tried to find the inverse of A by using the
> command
>> >> > C=A\speye(360000). But C*A is not equal to identity
>> > matrix.
>> >> > Why it is not working?
>> >> > If somebody knows how to I find the inverse of
> sparse
>> >> > large matrix simply, please help me.
>> >> > Thanks.
>> >> >
>> >> >
>> >> >
>> >>
>> >> The solution is to never ever to compute the inverse
> of a
>> >> sparse matrix.
>> >>
>> >> If dmperm reports that the matrix is a single block
>> > (nblocks
>> >> = length(r)-1 from the r output of dmperm) then your
>> > inverse
>> >> will be completely nonzero. The largest block of size
>> >> max(diff(r)) will be dense, if nblocks > 1. If that
> is
>> >> large, then it's hopeless trying to invert your sparse
>> > matrix.
>> >>
>> >> If you are wanting to multiply by the inverse of a
> sparse
>> >> matrix, then use backslash instead.
>> >>
>> >>
>> >
>>
>>
>


Subject: inverse of sparse matrix

From: Tim Davis

Date: 5 Jul, 2008 14:45:04

Message: 12 of 16

"Titus" <titus.edelhofer@mathworks.de> wrote in message
<g4lc3e$pc9$1@fred.mathworks.com>...
> H Gulcin,
>
> O.K., first of all, the situation is exactly what all the
replyers have
> anticipated, namely, that solving systems of linear
equations is what you
> are after!
>
> Let's see, what we can do. I hope, the dimensions of B and
E are somewhat
> smaller? Whereever you write inv(X)*Y you should replace
by solving the
> linear system(s) of equations, i.e., use X\Y.
> Your reformulation of the system then looks like
>
> (D\E - A\B) * y = (D\F - A\C)
>
> and solve for y:
>
> y = (D\E - A\B) \ (D\F-A\C)
>
> Titus
>
>
> "Gulcin M Muslu" <gulcinmuslu@gmail.com> schrieb im
Newsbeitrag
> news:g4latt$9ko$1@fred.mathworks.com...
> >
> > Dear Titus,
> >
> > I would like to solve linear algebraic system
> > as follows:
> >
> > Ax+ By= C
> > Dx+ Ey= F
> >
> > If I multiply the first eq. by inv(A) and the
> > second eq. by inv(D), then I get the linear system
> >
> > [inv(D)*E-inv(A)*B ] y= [inv(D)*F-inv(A)*C ]
> >
> > So I need the inverses of some matrices. As you
> > said before, the inverse of sparse matrix is not
> > sparse matrix in general. So I don't use the
> > command inv(A). I use the backslash operator
> > to calculate the inverse of A
> > A\speye(360000)
> >
> > But I get the error message
> >
> > ??? Error using ==> mldivide
> > Out of memory. Type HELP MEMORY for your options.
> >
> > How can I solve this problem?
> > Thanks


Titus is correct; A\speye(n) is just the same as inv(A), and
just as awful (in fact, I'm not sure but I'd be surprised if
inv(A) isn't simply implemented as A\speye(n) internally
anyway).

You don't need the inverse. The inverse is almost *never*
needed by any application.

Titus suggests y = (D\E - A\B) \ (D\F-A\C), but this is
2nd-guessing backslash. It's typically the case that you
get best results by letting backslash do all the work, all
at once (using John's suggestion, y = [A B ; D E] \ [C F]).
 Sometimes methods like Titus' suggestion can be better than
a single backslash, but more often than not a single
backslash is better.

The basic difference is that by splitting up the solution
using multiple backslashes, you constrain the fill-reducing
ordering. There's also overhead copying the results to and
from the internal data structures used in UMFPACK, CHOLMOD,
etc, which are different that MATLAB's sparse matrices.

Subject: inverse of sparse matrix

From: Gulcin M Muslu

Date: 31 Jul, 2008 19:34:01

Message: 13 of 16


  Hi,
  
 In order to solve the coupled linear system
  
  Ax+ By= C
  Dx+ Ey= F

 I tried Titus's suggestion y = (D\E - A\B) \ (D\F-A\C)
 and John's suggestion, y = [A B ; D E] \ [C F].
 Unfortunately, I couldn't get correct results bu using
both
 of them. I get the error message which is

 ??? Out of memory. Type HELP MEMORY for your options

 and the warning message

 Warning: Matrix is singular to working precision.
 
 First, I tired to use a decomposition, e.g.:
 [L,U] = lu(A);

 and then use backsolve: Ax = b, or LUx = b and:
 x = U\(L\b); I recieved the the above warning message.

 Second, I used iterative method which is conjugate
gradient
 method for John's suggestion. Again I receive the warning
message
 which is
  
 Warning: Matrix is singular to working precision.
 In sparfun/private/iterapp at 35
 In cgs at 211

 How can I solve this problem?
 Many thanks.





"Tim Davis" <davis@cise.ufl.edu> wrote in message
<g4o1dg$jjl$1@fred.mathworks.com>...
> "Titus" <titus.edelhofer@mathworks.de> wrote in message
> <g4lc3e$pc9$1@fred.mathworks.com>...
> > H Gulcin,
> >
> > O.K., first of all, the situation is exactly what all
the
> replyers have
> > anticipated, namely, that solving systems of linear
> equations is what you
> > are after!
> >
> > Let's see, what we can do. I hope, the dimensions of B
and
> E are somewhat
> > smaller? Whereever you write inv(X)*Y you should
replace
> by solving the
> > linear system(s) of equations, i.e., use X\Y.
> > Your reformulation of the system then looks like
> >
> > (D\E - A\B) * y = (D\F - A\C)
> >
> > and solve for y:
> >
> > y = (D\E - A\B) \ (D\F-A\C)
> >
> > Titus
> >
> >
> > "Gulcin M Muslu" <gulcinmuslu@gmail.com> schrieb im
> Newsbeitrag
> > news:g4latt$9ko$1@fred.mathworks.com...
> > >
> > > Dear Titus,
> > >
> > > I would like to solve linear algebraic system
> > > as follows:
> > >
> > > Ax+ By= C
> > > Dx+ Ey= F
> > >
> > > If I multiply the first eq. by inv(A) and the
> > > second eq. by inv(D), then I get the linear system
> > >
> > > [inv(D)*E-inv(A)*B ] y= [inv(D)*F-inv(A)*C ]
> > >
> > > So I need the inverses of some matrices. As you
> > > said before, the inverse of sparse matrix is not
> > > sparse matrix in general. So I don't use the
> > > command inv(A). I use the backslash operator
> > > to calculate the inverse of A
> > > A\speye(360000)
> > >
> > > But I get the error message
> > >
> > > ??? Error using ==> mldivide
> > > Out of memory. Type HELP MEMORY for your options.
> > >
> > > How can I solve this problem?
> > > Thanks
>
>
> Titus is correct; A\speye(n) is just the same as inv(A),
and
> just as awful (in fact, I'm not sure but I'd be
surprised if
> inv(A) isn't simply implemented as A\speye(n) internally
> anyway).
>
> You don't need the inverse. The inverse is almost
*never*
> needed by any application.
>
> Titus suggests y = (D\E - A\B) \ (D\F-A\C), but this is
> 2nd-guessing backslash. It's typically the case that you
> get best results by letting backslash do all the work,
all
> at once (using John's suggestion, y = [A B ; D E] \ [C
F]).
> Sometimes methods like Titus' suggestion can be better
than
> a single backslash, but more often than not a single
> backslash is better.
>
> The basic difference is that by splitting up the solution
> using multiple backslashes, you constrain the fill-
reducing
> ordering. There's also overhead copying the results to
and
> from the internal data structures used in UMFPACK,
CHOLMOD,
> etc, which are different that MATLAB's sparse matrices.
>

Subject: inverse of sparse matrix

From: Bruno Luong

Date: 1 Aug, 2008 02:33:02

Message: 14 of 16

"Gulcin M Muslu" <gulcinmuslu@gmail.com> wrote in message
<g6t439$7u9$1@fred.mathworks.com>...
>
> Hi,
>
> In order to solve the coupled linear system
>
> Ax+ By= C
> Dx+ Ey= F
>
> I tried Titus's suggestion y = (D\E - A\B) \ (D\F-A\C)
> and John's suggestion, y = [A B ; D E] \ [C F].
> Unfortunately, I couldn't get correct results bu using
> both
> of them. I get the error message which is
>
> ??? Out of memory. Type HELP MEMORY for your options
>

What are the dimensions of C and F? Is it vectors or matrices?

Bruno

Subject: inverse of sparse matrix

From: Gulcin M Muslu

Date: 1 Aug, 2008 07:00:05

Message: 15 of 16

 
 Hi,

 C and B are both vectors which dimensions are 90000 now.
 Later, I will increase the dimension regularly.
 Thanks.



"Bruno Luong" <b.luong@fogale.findmycountry> wrote in
message <g6tsku$5ej$1@fred.mathworks.com>...
> "Gulcin M Muslu" <gulcinmuslu@gmail.com> wrote in message
> <g6t439$7u9$1@fred.mathworks.com>...
> >
> > Hi,
> >
> > In order to solve the coupled linear system
> >
> > Ax+ By= C
> > Dx+ Ey= F
> >
> > I tried Titus's suggestion y = (D\E - A\B) \ (D\F-A\C)
> > and John's suggestion, y = [A B ; D E] \ [C F].
> > Unfortunately, I couldn't get correct results bu using
> > both
> > of them. I get the error message which is
> >
> > ??? Out of memory. Type HELP MEMORY for your options
> >
>
> What are the dimensions of C and F? Is it vectors or
matrices?
>
> Bruno

Subject: inverse of sparse matrix

From: Gulcin M Muslu

Date: 1 Aug, 2008 07:21:03

Message: 16 of 16

  
 Hi,
  
  Sorry for the above message.
  C and F are both vectors which dimensions are 90000 now.
  Later, I will increase the dimension regularly.
  Thanks.

"Gulcin M Muslu" <gulcinmuslu@gmail.com> wrote in message
<g6uc9l$clc$1@fred.mathworks.com>...
>
> Hi,
>
> C and B are both vectors which dimensions are 90000 now.
> Later, I will increase the dimension regularly.
> Thanks.
>
>
>
> "Bruno Luong" <b.luong@fogale.findmycountry> wrote in
> message <g6tsku$5ej$1@fred.mathworks.com>...
> > "Gulcin M Muslu" <gulcinmuslu@gmail.com> wrote in
message
> > <g6t439$7u9$1@fred.mathworks.com>...
> > >
> > > Hi,
> > >
> > > In order to solve the coupled linear system
> > >
> > > Ax+ By= C
> > > Dx+ Ey= F
> > >
> > > I tried Titus's suggestion y = (D\E - A\B) \ (D\F-
A\C)
> > > and John's suggestion, y = [A B ; D E] \ [C F].
> > > Unfortunately, I couldn't get correct results bu
using
> > > both
> > > of them. I get the error message which is
> > >
> > > ??? Out of memory. Type HELP MEMORY for your options
> > >
> >
> > What are the dimensions of C and F? Is it vectors or
> matrices?
> >
> > Bruno
>

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
do not use inv Tim Davis 5 Jul, 2008 10:50:09
inverse sparse matrix Steve Amphlett 3 Jul, 2008 04:10:43
inverse sparse matrix Gulcin M Muslu 3 Jul, 2008 03:50:06
rssFeed for this Thread

envelope graphic E-mail this page to a colleague

Public Submission Policy
NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Disclaimer prior to use.
Related Topics