Large matrix minimization over another matrix

3 ビュー (過去 30 日間)
Abdullah Fahim
Abdullah Fahim 2015 年 8 月 16 日
I have a function in the form of A = X + W .* Y where all of the variables are (M x N) matrices.
I want to minimize norm(A) over W such that the elements of W follow the equation: W(m,n) = W(m,n-1) + P(m,n)
With the help of some experts in internet, I come to the point that I have a running code. However, the code works for small M, N. Whenever I try with M,N in the range of 400-500, the whole thing hangs.
If anybody can suggest any optimization. Thanks.
M = 256;
N = 470;
X = rand(M, N);
Y = rand(M, N);
P = rand(M, N);
P(:,1) = 0;
P = cumsum(P,2); % convert to cumulative matrix
W =@(x,n) repmat(x(:), 1, n) + P; % Construct W
A =@(x,n) X - W(x,n) .* Y; % Construct Cost function
y = fminsearch(@(y) norm(A(y, N)), rand(M, 1));
w = W(y, N); % final result

回答 (0 件)

カテゴリ

Help Center および File ExchangeMathematics and Optimization についてさらに検索

タグ

タグが未入力です。

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by