Your line
would either be rejected as invalid syntax, or else would be interpreted as a request to call the function named "func" with the parameters 't', '=', '(a', '+', 'b', '+', 'c)'
Perhaps you meant something like
T = @(a,b,c) (a + b + c);
a = ...
b = ...
c = ...
if T(a,b,c) == 0
output([a b c]);
exit
end
But if so, we would wonder why you bother to calculate F since you do not use it, and we would wonder why you bother to create a "for" loop that is going to be executed only once, "for t = 0".
I would also point out that if you randomly sample the integers from 1 to 20, as in your randsample() calls, then none of the values can be 0 or negative and so their sum cannot be less than 3, which will never equal 0, and thus the array or function "output" will not be used. What is "output" anyhow? It is not a MATLAB built-in routine.
Best Answer