I couldn't find anything like this on the forum. Sorry, this is basic. The variables are in the woekspace. The code is:
function [Dist, BdBox] = test_DistFnc(P,gd,sf,ns) C = zeros(10,2); h = 0; q=0;
[dl, bt] = decsg(gd,sf,ns); Error using test_DistFnc Not enough input arguments.
Any help would be greatly appreciated, thanks
When you give the command
you must follow it by 4 input arguments on the command line. You have not done that.
When you have a function with arguments in the "function" line, then MATLAB will not automatically use variables of that name that are in the caller's workspace or the base workspace: the values must be passed specifically.