How can I solve this linear System?
古いコメントを表示
Lets say I have
A * x = b
n*n n*1 n*1
Unknown known known
A is unknown but it is known to be a symmetric Toeplitz matrix. eg:
[ 5 2 0 7 ;
2 5 2 0 ;
0 2 5 2 ;
7 0 2 5 ]
How Can I find A?
Thanks in advance.
Saeed
採用された回答
その他の回答 (3 件)
Richard Brown
2012 年 4 月 23 日
And another way (which could be chained into a very long one-liner). First, assuming you have the following test data:
% Test data
n = 4;
x = rand(n, 1);
b = rand(n, 1);
It's only a couple of lines:
B = toeplitz(x,x(1)*eye(1,n)) + fliplr(toeplitz(x(end)*eye(1,n), flipud(x)));
B(:,1) = 0.5 * B(:, 1);
A = toeplitz(B \ b);
Jan
2012 年 4 月 22 日
At first you can convert this into a linear system:
A = [a, b, c, d; ...
b, a, b, c; ...
c, b, a, b; ...
d, c, b, a];
Then multiply this with your known x and b to obtain a standard linear problem with the unknowns [a,b,c,d] in a vector.
Saeed
2012 年 4 月 23 日
2 件のコメント
Andrei Bobrov
2012 年 4 月 23 日
A = toeplitz(bsxfun(@rdivide,tril(toeplitz(x))+hankel(x),eye(1,numel(x))+1)\b)
Richard Brown
2012 年 4 月 23 日
punk :p
カテゴリ
ヘルプ センター および File Exchange で Linear Algebra についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!