How can i create a function block in simulink that takes multiple input vectors as arguments?

조회 수: 33 (최근 30일)
From the image attached the function block uses u(u[1])t input u[2] from second input, etc. I keep getting errors if i implement it as shown using a Matlab function block

채택된 답변

Fangjun Jiang
Fangjun Jiang 2022년 12월 2일
Assume the same input, inside the MATLAB Function block, use u(1), u(2) to reference, not u[1], u[2].
  댓글 수: 2
Brian Kiprono
Brian Kiprono 2022년 12월 2일
Thank you very much that worked,also do you have a good explanantion on why the square brackets don't work. Thanks
Fangjun Jiang
Fangjun Jiang 2022년 12월 2일
It is defined that way.
See "doc paren" to know the usage of (), {}, []

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Modeling에 대해 자세히 알아보기

제품


릴리스

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by