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)
0 个评论
采纳的回答
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 Center 和 File Exchange 中查找有关 Simulink Functions 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!