Large matrix minimization over another matrix

3 次查看(过去 30 天)
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 CenterFile Exchange 中查找有关 Mathematics and Optimization 的更多信息

标签

尚未输入任何标签。

Community Treasure Hunt

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

Start Hunting!

Translated by