As a third method, I would propose using an inport, and then specifying a workspace variable using the "Import/Export" section of the Configuration Parameters to specify a MATLAB workspace variable to read as an input.
This has several advantages over the other approaches. For both of the other options, if you place the model inside of a larger model reference hierarchy, you will find yourself locked into using the same workspace variable for every instance. By using an input port, on the other hand, the data will come from whatever signal line is connected to it, making each instance more flexible.
Also, any signal-based inputs can be driven by a Signal Builder block further upstream. This provides a much easier way to coordinate changes in the signal's value with other signals if there are timing dependencies.