MATLAB: I have this message although I can’t see where is the problem

fsolvenot enough input arguments

function F = root4d(lr, cr, ll, cl) F(1) = (1/(lr .* cr .* ll .* cl).^(1/4)) – 400000000; F(2) = sqrt(lr./cr) – 50; F(3) = sqrt(ll./cl) – 50; F(4) = (1/sqrt(lr .* cr)) .* abs(1-sqrt(1+(sqrt(lr .* cr)/sqrt(ll .* cl)))) – 400000000;
fun = @root4d; x0 = [10^-9, 10^-12, 10^-9, 10^-12]; x = fsolve(fun, x0)
Not enough input arguments.
Error in root4d (line 2) F(1) = (1/(lr .* cr .* ll .* cl).^(1/4)) – 400000000;
Error in fsolve (line 230) fuser = feval(funfcn{3},x,varargin{:});
Caused by: Failure in initial objective function evaluation. FSOLVE cannot continue. I've tried using * and .*, ^ and .^ and adding a fifth equation: F(5) = (1/sqrt(lr .* cr)) .* abs(1+sqrt(1+(sqrt(lr .* cr)/sqrt(ll .* cl)))) – 1200000000;

Best Answer

fun = @(x)root4d(x(1),x(2),x(3),x(4))
Best wishes
Torsten.