Info
La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.
Is it possible to use a ConnectionCallback without an External Script?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
I would like to enable a callback function for a port connection change, in a block within a blockset I am developing for several users. But I do not want to require each of these users to maintain any m-script files in order to use these blocks. I have attempted to use an anonymous function or a function handle within the model's workspace, but I haven't found any syntax which has worked. The functionality I want for this callback would be the same as the block's CopyFcn callback, so the function could be something as simple as:
@(x) eval(get_param(get_param(x,'Parent'),'CopyFcn'))
'x' would be the connection port's handle, its 'Parent' would be the block, and so this line would evaluate the block's copy function. But how do I get the port's ConnectionCallback to execute this line without using an external script?
0 comentarios
Respuestas (0)
La pregunta está cerrada.
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!