Create a function in simulink

1 visualización (últimos 30 días)
Khalid
Khalid el 27 de Sept. de 2016
Editada: Khalid el 13 de Nov. de 2016
Hi guys,
I'm working in circuit breaker switching and I would like to ask if I want to create a function in simulink (ode23s) to call a data from workspace or if there is an easy way to take the measurement direct from block measurement: v(:,1), i(:,1), g, po, and a.
to make the calculation for the following formula: g=i./v; P=v.*i; PP=po.*g.^a; % note po & a are constant.
Thanks in advance for your attention.

Respuesta aceptada

INFOZOU
INFOZOU el 4 de Oct. de 2016
You can use the block "from workspace" from * * sources** in Simulink. For your case, you can use directly "reshape", "add", "product" and divide blocks from * *Math operation** in Simulink.
  2 comentarios
Khalid
Khalid el 5 de Oct. de 2016
Thanks Lilia, I tried before but the shape it seems a bit different from what I'm expecting not the same 100% compare to when I do a direct calculation.
INFOZOU
INFOZOU el 6 de Oct. de 2016
Not at all, I hope that you find a solution and I help you. May be, you should add clock and save it to workspace. In addition, you do not obtain the same curve, may be, because the horizontal axis is not the same.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Nonlinear Operators en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by