It seems that defining a function f = eval(fex) works. Maybe it isn’t the most elegant way to do it.
f = eval(fex)