Issue with "Simulink does not support code generation"
I was going about tackling this problem completely wrong. In order to replace the summing block, one must NOT remove the Transfer Function blocks which feed into the summing block and add them inside the script.

A MATLAB Function does not support code generation (and rightly so) such that a transfer function may be implemented inside it. That is why the blocks simply feed into the MATLAB Function as follows.



The script would very simply be:

function y1 = fcn(u1, u2, u3)

   x = (u1 + u2 +u3);
   y1 = x;

end