Hi,
I try to define this function
syms k;error = @(c, r)symsum((abs(Data(k,:)-c)-r).^2,k,1,119);
Where Data is a 119×3 matrix, and c and r are 1×3. I get this error:
Error using sym/subsindex (line 737)Invalid indexing or function definition. When defining a function, ensure thatthe arguments are symbolic variables and the body of the function is a SYMexpression. When indexing, the input must be numeric, logical, or ':'.
I understand the error is in the index k of Data, but I don't know how to fix it.
Any one can help me?
Thanks
Best Answer