Solving a system of linear equations and generate transfer matrix.
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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.
0 comentarios
Respuestas (1)
Star Strider
el 8 de Oct. de 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 comentarios
Star Strider
el 9 de Oct. de 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.)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!