Based on what I can understand I think there is a logical error in the 15th line of your code. F_of_u is a function of x and not u_of_x. Therefore there is nothing the subs command can replace. Also if needed you can refer to the documentation for the subs() function.
You can use the debugger: Set a breakpoint in this line, run the code again, and when Matlab stops check the dimensions of the variables. The error message tells you, that they have a different number of columns.
Best Answer