Can anyone tell me why i get the error too many inputs for this function?

`function [ W,E_W ] = Assessment_6( tau,beta,tol )%Assessment_6 `

% computes essential bandwidth W for square pulse.

% INPUTS : tau = pulse width

% beta = fraction of signal energy desired in W

% tol = tolerance of relative energy error

% OUTPUTS : W = essential bandwidth [rad/s]

% E_W = Energy contained in bandwidth W

W = 0;step = 2*pi/tau; %intial guess and step values.

X_squared = inline('(tau*Assessment_6 (omega*tau/2)).^2','omega','tau');E = beta*tau; %Desired energy in W.

relerr = (E-0)/E; %Intial relative error is 100 percent.

while(abs(relerr) > tol), if (relerr > 0), %W too small

W = W + step; %Increase W by step

else if (relerr < 0), %W too large

step = step/2; W = W-step; %Decrease step size and then W.

end E_W = 1/(2*pi)*quad(X_squared, -W,W, [], [], tau); relerr = (E - E_W)/E; endendend

## Best Answer