error in syms line 56 WHY THIS ERROR ?

2 ビュー (過去 30 日間)
Hugh Schemmer
Hugh Schemmer 2017 年 9 月 2 日
コメント済み: Walter Roberson 2017 年 9 月 4 日
I just purchased and installed the Symbolic Toolbox but it does not seem to work. Why do I get this error? This is from an example from the Mathworks website.
syms s(t) f(x,y)
Error using assignin Invalid variable name "s(t)" in ASSIGNIN.
Error in syms (line 56) assignin('caller',varargin{i},sym(varargin{i}));
  2 件のコメント
Steven Lord
Steven Lord 2017 年 9 月 3 日
Which release are you using? Does the documentation included in your installation list that as a valid syntax?
The ability to create symbolic functions was introduced in release R2012a.
Walter Roberson
Walter Roberson 2017 年 9 月 4 日
"just purchased" -- it isn't possible to purchase R2011b or earlier anymore!

サインインしてコメントする。

採用された回答

Walter Roberson
Walter Roberson 2017 年 9 月 2 日
You should use
which -all syms
to see where you are getting the syms function from. You should see toolbox/symbolic/symbolic/syms.m but somehow you have some other routine instead.
syms() does have some assignin('caller') calls, but none of them have the form you show in the error message, and none of them occur until after line 200 in the routine -- line 56 is still part of the help text.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeConversion Between Symbolic and Numeric についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by