To set your output to an initial value at t=0, you can create a work vector that has an initial value, say 1 (ssSetIWorkValue(S, 0, 1)).
Then in 'mdlOutputs' you can use an if condition (if(ssGetIWorkValue(S, 0) == 1)) to set the initial value of the output to the desired value.
Finally, you can change the value of the work vector in 'mdlUpdate' in such a way that the condition in 'mdlOutput' is not met. This ensures that the initial value is set only once.
You can try to follow the steps given in the link provided below: