I think you are running a Simulink model and outputting values for your entire 10-second simulation using the To Workspace block. In Matlab, you can then extract the data collected between 5-10 seconds from your saved value as follows. Let us say you rename your time variable timeSimulation and your dependant variable temperature.
temperatureExtracted = temperature(timeSimuation >= 5 & timeSimulation <= 10) ;
If this is not what you want to do, please provide more specifics as Jan suggested.