Syntax error in simulink function

3 次查看(过去 30 天)
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)

更多回答(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