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 Center および File ExchangeSimulink Functions についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by