main.m788 chars27 lines
This code loops through all the blocks in the model and checks if each block is an Inport. If it is, it replaces it with a Constant block. The Constant block is added in the same position as the Inport block using the get_param
and set_param
functions. Finally, the model is saved and closed.
gistlibby LogSnag