I made a simulink model and simulation time is 60, in which there is one subsystem which I want to run for only 20 to 40 time period. I don't want any output from that subsystem beside this (20-40) time period. Is it possible?
You can use the "Enabled Subsystem" with a vector time depending to swtch on/off the subsystem, composed by 0 (disable) for the first 19 seconds, 1 (enable) between 20 to 40 seconds and 0 (disable) from the 41 second to the end of the simulation, .
The easiest way to do this is to create a matrix in matlab workspace (one column from time 0 to 60 seconds and a column of 1s and 0s) and then call it up using simulink subsystem "from workspace".Then link in simulink the ouput of "from workspace" subsystem to the enable button of "enable Subsystem".