solve system by converting a matrix to vector
1 view (last 30 days)
Show older comments
how i can solve like this eqation:
Ax=b for x,
where A is 2(n-1)×2(n-1) matrix
and b is 2(n-1)×(n-1)matrix
and x=[u v]' is 2(n-1)×(n-1)matrix where u and v are (n-1)×(n-1) matrices
i tried to ues lsqr but i always got an error. I think that because b should be a vector andon also x should be one variable not two u and v.
so my qusetion is can i convert x and b to be as vector and how?
and if i can convert them then i have to change the size of A and make it larger than what its , i think about adding zeros, but it not works with me
0 Comments
Answers (1)
Torsten
on 16 Feb 2023
n = 4;
A = rand(2*(n-1),2*(n-1));
b = rand(2*(n-1),n-1);
x = A\b
u = x(1:n-1,:)
v = x(n:2*(n-1),:)
0 Comments
See Also
Categories
Find more on Linear Algebra 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!