I have a file called F.m which contains the following code:
1 % INPUT:
2 % 3D vector x
3 %
4 % OUTPUT:
5 % function value at x
6 7 function val = f(x)8 val= x(1)^2 + x(1)*x(2)^3 - 12*x(3) + 4;9 end
I am trying to call F.m in an algorithm in another file, but when I run the code, I get the following error:
"Error using F (line 8) Not enough input arguments."
I'm new to MATLAB, so I'm not sure what I'm doing wrong here. Any help would be greatly appreciated!
Best Answer