MATLAB: Invalid syntax at ‘=’ . A ‘(‘ might be missing a closing ‘)’

invalid syntax '='MATLAB

The error is at line 14 and 26
switch nargin
case 0
disp('Non ci sono stati input per la funzione!')
case 1
if (f = 0)
disp('Non hai inserito correttamente la funzione la funzione')
end
case 2
if(~isscalar(xo) || isinteger(xo))
disp('Mammt')
end
case 3
if(~isscalar(xo) || isinteger(xo)) % anche se ci sta un altro controllo che nello non vuole dirmi
disp('A')
end
case 4
if(~isinteger(NMAX) || NMAX = 0 || ischar(NMAX))
disp('A pecrrrr, cioè nmax non va bene')
end
end

Best Answer

if (f == 0)
and same thing in this line
if(~isinteger(NMAX) || NMAX == 0 || ischar(NMAX))