Alright so I took some stuff out and now I'm down to this. For some reason though, it's just coming up with random numbers from the array instead of using them to find a 1D array which adds to zero. I think what the issue is, is that it's not using the integers to try and find where T would equal zero.
F = [-5,-4,-3,-2,-1,1,2,3,4,5];for T = @(a,b,c) (a + b + c);a = randsample (F,1);b = randsample (F,1);c = randsample (F,1);if T(a,b,c) == 0disp [a b c]endend
Best Answer