Syntax error in simulink function

조회 수: 3 (최근 30일)
Akylas Strathgakos
Akylas Strathgakos 2015년 11월 27일
댓글: Akylas Strathgakos 2015년 11월 28일
Hello, can you help me find the error in this function?
(1/L)*(-R*u(1)+ws*L*u(2)-md*u(3)+Ud)

채택된 답변

Walter Roberson
Walter Roberson 2015년 11월 27일
There is no obvious syntax error there, but the code would fail if L is a vector (or matrix) or if both L and ws are vectors or matrices when size(ws,2) is not the same as size(L,1)
You might need
(1./L) .* (-R*u(1) + ws .* L * u(2) - md*u(3) +Ud)
  댓글 수: 1
Akylas Strathgakos
Akylas Strathgakos 2015년 11월 28일
They are simple variables ,thank you for the answer though

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

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by