I am trying to run a simulink block diagram simulation.
I have the following function in a func block: (( Y* (abs(u(nb+1))<Tfault) ) +(( Yf * (abs(u(nb+1))>=Tfault)) & (abs(u(nb+1)) <(Tfault+Tclear) )) + (Ypf * (abs(u(nb+1)) >= (Tfault+Tclear) ))) \ u(1:nb)
Y,Yf,Ypf are matrices
no matter what I do I continue to get a syntax error and I simply cannot see what the problem is. Can someone please tell me what is wrong with this function.

 Respuesta aceptada

Fangjun Jiang
Fangjun Jiang el 25 de Mayo de 2021

0 votos

  1. Provide values for every variable in the formula, including nb, Tfault, Tclear
  2. Provide an instance value of u
  3. Run the formula chunck by chunk, like Y* (abs(u(nb+1))<Tfault) and then Yf * (abs(u(nb+1))>=Tfault), and then the next
  4. You will find the problem, such as missing a parentheses

2 comentarios

reshma muralidharan
reshma muralidharan el 26 de Mayo de 2021
Thank you sir.
Kamran
Kamran el 14 de Feb. de 2025

I still did not understand if it is possible to write the complete relationship.

Iniciar sesión para comentar.

Más respuestas (0)

Productos

Etiquetas

Preguntada:

el 25 de Mayo de 2021

Comentada:

el 14 de Feb. de 2025

Community Treasure Hunt

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

Start Hunting!

Translated by