Solving a system of linear equations and generate transfer matrix.

1 view (last 30 days)
Hello everyone,
I have a rather simple problem but can't come up with a solution. I have a system of linear equations which I want to solve. The system is
-B*v=A*p
I know B, A and v but not p. B and A are the size (5074x5074). v is the size (5074x1). So p should be the size (5074x1). However I only want to get the first 2537 entries of p. So I want to find a matrix Z so that
p=Z*v(1:2537)
with p beeing the size (2537x1), Z (2537x2537) and v (2537x1).
I think I can get p with
p=A(1:2537,1:2537)\(-B(1:2537,1:2537)*v(1:2537))
Is this correct? And how can I get Z? Thank you very much in advance for any help.

Answers (1)

Star Strider
Star Strider on 8 Oct 2014
I would do the entire matrix division, then get the desired values of ‘p’ from it. Truncating your matrices would likely give you different values of ‘p’ than calculating it from your full ‘A’ and ‘B’ matrices.
I tested this to be sure, and p = Z*v; with Z = A\-B gives the same result as p = A\(-B*v).
  3 Comments
Matthias
Matthias on 9 Oct 2014
Yes, sorry I forgot to tell. Is it sufficient to first solve the complete system and afterwards truncate Z? I need the correlation between the first 2537 entries of v and p. I know that the correlation matrix is quadratic, has full rank and is symmetric or hermitian. The problem is in the field of acoustics from a boundary element calculation. An arbitrary velocity distribution v can be related to the according pressure distribution once Z is obtained.
Star Strider
Star Strider on 9 Oct 2014
I would solve the system, then truncate ‘p’ as necessary. I would leave ‘Z’ alone, since it seems to have all the information you need.
It would seem to be producing pressures for zero velocities, but I cannot tell if that is physically realistic or artefactual. (I have no background in acoustics beyond undergraduate physics.)

Sign in to comment.

Categories

Find more on Programming in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!