mcc -e myfile.fig myfile.m sedumi.m callsedumi.m
mcc -e myfile.fig myfile.m callsedumi.m sedumi.m ada_pcg.m install_sedumi.m
索引超出矩阵维度。出错 mtree/kind (line 9)a = o.KK{ o.T( o.IX, 1 ) };出错 matlab.depfun.internal.getSig (line 103)switch myRoot.kindUnable to determine function name or input/output argument count for functionin MATLAB file "ada_pcg.m".Please use MLINT to determine whether this file contains errors.
Output = load('Output.mat');Output = Output.Output;Dic = load('Dic.mat');Dic = Dic.Dic;U = load('U.mat');U = U.U;
[M,N]=size(Dic);lambda = 0.3;iter = 1;
x = sdpvar(N,1);
Constraints = [];
Objective = (lambda*norm( U(:,iter).*x, 1 )+ 0.5*sum((Dic* x-Output).^2) )
options = sdpsettings('solver','sedumi','verbose',0)
sol = optimize(Constraints,Objective,options);
if sol.problem == 0 % Extract and display value solution = value(x)else display('Hmm, something went wrong!'); yalmiperror(sol.problem)end
a=num2str(solution(1));set(handles.edit1,'string',a);
Hi Johan,
Thanks for your suggestion. I am so sorry to bother you again, I am not very familiar with matlab so my questions may seem silly. After I try to turn on display,
the information showed that 'Solver not found(sedumi)'
this is the error information:
but I already have add the sedumi package to matlab path, I don't know why the solver can't be found.
function y = ada_pcg(x)
y=x;