From: Bruno Luong on
"Lukas " <lukas.bystricky(a)afcc-auto.com> wrote in message <i12fq4$6la$1(a)fred.mathworks.com>...

>
> Thanks John.
>
> I should probably clairify what I meant when I said some information might be lost when converting to sparse. I realize that all the values stored in the matrix are still going to be there, so accuracy won't be affected. What I meant is that I think there's a better way to exploit the banded structure of the matrix, i.e. a way to solve it quicker than a generic sparse matrix.
>

You should type

> doc mldivide

and read the "Algorithm" section. Sparse/Banded matrix is detected by the slash operator.

Bruno
From: Matt J on
"Lukas " <lukas.bystricky(a)afcc-auto.com> wrote in message <i10fuc$b5q$1(a)fred.mathworks.com>...

> My question is: Are there any efficent ways to solve an equation X = A/B where A is the banded matrix I already have?
================

Are you sure you don't mean X=A\B? What you had written solves X*B=A, whos complexity depends primarily on B, not A.

Assuming this is what you meant, mldivide is already designed to take advantage of the bandedness of sparse matrices. See "doc mldivide".
From: Lukas on
"Matt J " <mattjacREMOVE(a)THISieee.spam> wrote in message <i12h75$621$1(a)fred.mathworks.com>...
> "Lukas " <lukas.bystricky(a)afcc-auto.com> wrote in message <i10fuc$b5q$1(a)fred.mathworks.com>...
>
> > My question is: Are there any efficent ways to solve an equation X = A/B where A is the banded matrix I already have?
> ================
>
> Are you sure you don't mean X=A\B? What you had written solves X*B=A, whos complexity depends primarily on B, not A.
>
> Assuming this is what you meant, mldivide is already designed to take advantage of the bandedness of sparse matrices. See "doc mldivide".

Interesting, I didn't know Matlab was that clever. And yes I did mean A\B, thankfully you're the only one who picked up on my grevious error.

Provided that I have to convert A to sparse first, I suppose this is the best I can do.

Cheers.
From: Steven Lord on

"Lukas " <lukas.bystricky(a)afcc-auto.com> wrote in message
news:i12i5c$g7d$1(a)fred.mathworks.com...
> "Matt J " <mattjacREMOVE(a)THISieee.spam> wrote in message
> <i12h75$621$1(a)fred.mathworks.com>...
>> "Lukas " <lukas.bystricky(a)afcc-auto.com> wrote in message
>> <i10fuc$b5q$1(a)fred.mathworks.com>...
>>
>> > My question is: Are there any efficent ways to solve an equation X =
>> > A/B where A is the banded matrix I already have?
>> ================
>>
>> Are you sure you don't mean X=A\B? What you had written solves X*B=A,
>> whos complexity depends primarily on B, not A.
>>
>> Assuming this is what you meant, mldivide is already designed to take
>> advantage of the bandedness of sparse matrices. See "doc mldivide".
>
> Interesting, I didn't know Matlab was that clever. And yes I did mean A\B,
> thankfully you're the only one who picked up on my grevious error.
> Provided that I have to convert A to sparse first, I suppose this is the
> best I can do.

Well, there is one other thing you could try. Most if not all of the sparse
iterative solvers accept either a sparse matrix A or a function that given x
computes A*x and/or A'*x.

http://www.mathworks.com/access/helpdesk/help/techdoc/ref/f16-5872.html#f16-6565

If you can perform this matrix-vector multiplication efficiently using the
"packed" form of your matrix, you may be able to solve the problem without
having to create the full or sparse A matrix.

--
Steve Lord
slord(a)mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ
To contact Technical Support use the Contact Us link on
http://www.mathworks.com


From: Lukas on
"Steven Lord" <slord(a)mathworks.com> wrote in message <i12jo4$13k$1(a)fred.mathworks.com>...

> Well, there is one other thing you could try. Most if not all of the sparse
> iterative solvers accept either a sparse matrix A or a function that given x
> computes A*x and/or A'*x.
>
> http://www.mathworks.com/access/helpdesk/help/techdoc/ref/f16-5872.html#f16-6565
>
> If you can perform this matrix-vector multiplication efficiently using the
> "packed" form of your matrix, you may be able to solve the problem without
> having to create the full or sparse A matrix.
>
> --
> Steve Lord
> slord(a)mathworks.com
> comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ
> To contact Technical Support use the Contact Us link on
> http://www.mathworks.com
>

Steve,

I'm not sure I understand. Could you be more specific? I can't really see any of the functions being overly efficient on banded matrices. Also is reduced accuracy a concern with any of these methods?

Thanks.

Lukas