When you do
the variable f isn't a function, but a function handle, i.e., a sort of "pointer" that allows you to refer to the function you've created. As such, it doesn't make sense to add this handle to something.
A better approach to do what it seems you're after is, first of all, do away with the symoblic stuff. You don't need it. Assuming size(array)=[100 3], the following should do what you want:
table = readtable('data.csv');
array = table2array(table);
FUN = @(x) norm(array*x)^2;
Note that the function argument x passed in here should be a 3-element column vector.
0 Comments
Sign in to comment.