solve system by converting a matrix to vector
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Antworten (1)
Torsten
am 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 Kommentare
Siehe auch
Kategorien
Mehr zu Linear Algebra finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!