필터 지우기
필터 지우기

Undefined function 'function_name' for input arguments of type 'double'

조회 수: 3 (최근 30일)
Pushkar Khatri
Pushkar Khatri 2018년 5월 30일
댓글: Stephen23 2018년 5월 30일
I'm solving a convex optimization problem(for matrix) in which I'm using 2 functions, one for objective function and another for nonlinear constraint. When I run it via optimization toolbox, it shows "Undefined function 'f_name' for input arguments of type 'double'".Also, I passed the initial value of x as zero matrix of required size(which is 498 here). Is the starting value passed correctly?
Here is the function codes
function f= coheren(x)
load ('Dictionary.mat','D');
Z = (D)*(D');
[V, U,W]=svd(Z);
a = mtimes(U,V');
b = mtimes(V,U);
f = (norm(U-(a*(x')*(x)*b)))^2;
end
function [c,ceq] = cohcon(x)
load ('Dictionary.mat','D');
[m,n]= size(D);%size(x)
k = D*(D');
T = (x)*k*(x');
[V1,U1,W1] =svd(T);
ceq = rank(U1)-m;
c= [];
end
  댓글 수: 1
Stephen23
Stephen23 2018년 5월 30일
@Pushkar Khatri: please show us the complete error message. This means all of the red text.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Linear Least Squares에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by