Solving a system of linear equations and generate transfer matrix.
3 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
回答 (1 件)
Star Strider
2014 年 10 月 8 日
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 件のコメント
Star Strider
2014 年 10 月 9 日
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.)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!