You cannot directly use a Matlab function to calculate the output of a block based on the simulation inputs. As you suggested, a C-Script block would be appropriate and is the most flexible option.
However, if you're not familiar with C or the C-Script block, the simple arithmetic functions your example can be implemented using the "Function" block. For the sake of readability, you can break down your equation into a few Function blocks and connect them with other blocks such as multiply, sum, offset, etc.
See the attached example and screenshot.
