Skip to content

Instantly share code, notes, and snippets.

@iglesias
Created October 12, 2020 08:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iglesias/8d682c7a1b36143c25b6700845f1edb2 to your computer and use it in GitHub Desktop.
Save iglesias/8d682c7a1b36143c25b6700845f1edb2 to your computer and use it in GitHub Desktop.
CVX experiment
c_num_simulations = 1000;
for n = 1:c_num_simulations
cvx_begin
variable Z(66, 7);
rho = 1; tau = 0.5;
objective = rho*norm_nuc(Z) + tau*sum(norms(Z, 2, 2));
minimize(objective);
subject to
% y is an observation
% A and V are model matrices
y == V*A*vec(Z);
cvx_end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment