Borrar filtros
Borrar filtros

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)
Jeremy
Jeremy el 13 de En. de 2015
Cerrada: MATLAB Answer Bot el 20 de Ag. de 2021
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?

Respuestas (0)

La pregunta está cerrada.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by