Large matrix minimization over another matrix

4 views (last 30 days)
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

Answers (0)

Categories

Find more on Mathematics and Optimization in Help Center and File Exchange

Tags

No tags entered yet.

Community Treasure Hunt

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

Start Hunting!