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.

 채택된 답변

Fangjun Jiang
Fangjun Jiang 2021년 5월 25일

0 개 추천

  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

reshma muralidharan
reshma muralidharan 2021년 5월 26일
Thank you sir.
Kamran
Kamran 2025년 2월 14일

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

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

제품

태그

질문:

2021년 5월 25일

댓글:

2025년 2월 14일

Community Treasure Hunt

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

Start Hunting!

Translated by