i probably have sort of a similar problem here. i am designing a controller block and requires a feature were the adaptive gains are stored in the model and re-used when simulink stop and start again.
the gains are in the form of signal from another block. the only way i find i could perhaps do this without losing the data when simulink stops and resets all parameters and variables is to somehow store the gains in the 'initial condition' parameter in one of the standard simulink block i am using (memory, in this case). using callback function i could change the 'initial condition' in that block by clicking on the checkbox of my masked subsystem checkbox during simulink on the fly. but what i cannot do is to grap the latest gain signal and use those values (as vector) in as the 'initial condition' for the memory block.
have looked at various ways to do that, not sure if there's actually a way. if so, and someone could help.. very very much appreciated. thanks