Syntax error in simulink function

1 view (last 30 days)
Hello, can you help me find the error in this function?
(1/L)*(-R*u(1)+ws*L*u(2)-md*u(3)+Ud)

Accepted Answer

Walter Roberson
Walter Roberson on 27 Nov 2015
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 Comment
Akylas Strathgakos
Akylas Strathgakos on 28 Nov 2015
They are simple variables ,thank you for the answer though

Sign in to comment.

More Answers (0)

Categories

Find more on Simulink Functions in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!