Bus signals from simulink functional block

1 visualización (últimos 30 días)
Neal Chaudhuri
Neal Chaudhuri el 1 de Nov. de 2021
Comentada: Neal Chaudhuri el 3 de Nov. de 2021
Hey everyone,
I am trying to get bus data in and out of matlab function block in simulink. Here's a simple model I have tried to test to it out:
The function is defined as :
function y = fcn(b1, b2)
y.b1 = b1 - b2;
y.b2 = b1 + b2;
I have created a simulinkBus; "x" as shown in the image below:
But I keep getiing this error, when I run my model:
What am I doing wrong here?

Respuestas (1)

Alex Alex
Alex Alex el 2 de Nov. de 2021
look here
https://www.mathworks.com/help/simulink/ug/attach-bus-signals-to-matlab-function-blocks.html
  1 comentario
Neal Chaudhuri
Neal Chaudhuri el 3 de Nov. de 2021
Hey Alex,
Thanks for your suggestion. I have been following the information from the link you recommended, but to no avail.
And, I also can't find "Ports and Data Manager" in my simulink toolstrip.
Regards,
Neal

Iniciar sesión para comentar.

Categorías

Más información sobre Interactive Model Editing en Help Center y File Exchange.

Productos


Versión

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by