Simulink transfer function with sinusoidal parameter
Mostrar comentarios más antiguos
Hi
I need to design a transfer function in the following form: K/ (Ts + 1) where the numerator K is scalar and varies sinusoidal
I tried adding and event listener on the start callback
iev = add_exec_event_listener('main\le_block','PostOutputs', @vary_me)
the vary_me function looks like:
function vary_me
a=evaluatevars('tout');
a=a(end);
a=sin(a);
set_param('main/le_block','Numerator',num2str ( sin(a) ) );
I noticed the following error
Warning: Error occurred while evaluating listener callback.
Error using vary_me
Too many input arguments.
How should I solve this issue? Is there any easier way to implement the same behavior (sinusoidal-varying numerator of transfer function) ?
Thanks for any reply
Respuesta aceptada
Más respuestas (1)
River Rock
el 11 de Nov. de 2012
0 votos
3 comentarios
Azzi Abdelmalek
el 11 de Nov. de 2012
That was not your question!
Azzi Abdelmalek
el 11 de Nov. de 2012
You can post another question if you want. And I don't understand, what means Now how about...
River Rock
el 12 de Nov. de 2012
Editada: River Rock
el 12 de Nov. de 2012
Categorías
Más información sobre Simulink en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
