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 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