C and Pi are vectors and have the same number of element.
min sigmaC§Pi§ +lamda||Pi*Pi||
s.t. Pi>=0 sigmaPi§=1
my code is below:
sum_temp=0;
n = viewNum;
cvx_begin
variable pi(n)
minimize(c.*pi' + lamda*norm( pi, 2 ) )
subject to
pi>=0
sum(pi) =1
cvx_end
Matlab show the error is:
Error using subsindex
Function ‘subsindex’ is not defined for values of class ‘cvx’.
Error in multiview_NMF (line 123)
sum(pi) =1
Yes, indeed. I don’t like having to have the reserved word check in my code, because it slows things down. But using names for CVX variables that coincide with built-in functions, or even user-defined functions in the MATLAB path, leads to really weird behavior.