MATLAB Answers

syms x - Not enough input arguments.

8 ビュー (過去 30 日間)
Jiawei Gong
Jiawei Gong 2021 年 1 月 27 日
編集済み: Jiawei Gong 2021 年 1 月 27 日
>> syms x
Not enough input arguments.
Error in digits (line 3)
for i=1:length(s)
Error in sym (line 192)
S.Digits = digits;
Error in syms (line 227)
defined = sym(zeros(1, length(args)));
>> ver
MATLAB Version 9.8 (R2020a)
Simulink Version 10.1 (R2020a)
Symbolic Math Toolbox Version 8.5 (R2020a)
>> which syms
C:\Program Files\Polyspace\R2020a\toolbox\symbolic\symbolic\syms.m
Comment: It looks like matlab can find and call the function. Any explaination or suggestion regarding the error is greatly appreciated.

採用された回答

Cris LaPierre
Cris LaPierre 2021 年 1 月 27 日
Is it possible you have overwritten the digits function?
>> which digits
C:\Program Files\MATLAB\R2020a\toolbox\symbolic\symbolic\digits.m
My R2020a file does not contain a line "for i=1:length(s)" anywhere in it. Your error message suggests it is line 3.
When I create a local digits function (saved in the current folder), I get the following error message.
Not enough input arguments.
Error in digits (line 3)
for i=1:length(s)
Error in sym (line 201)
S.Digits = digits;
Error in sympref>implementedSymprefs (line 154)
y = {'FourierParameters', sym([1,-1]), 'MuPAD', 'sym', {};...
Error in sympref (line 90)
iSymprefs = implementedSymprefs;
Error in symengine
Error in sym (line 200)
symengine;
Error in syms (line 227)
defined = sym(zeros(1, length(args)));
Warning: Failed to initialize symbolic preferences.
> In symengine
In sym (line 200)
In syms (line 227)
Not enough input arguments.
Error in digits (line 3)
for i=1:length(s)
Error in sym (line 201)
S.Digits = digits;
Error in syms (line 227)
defined = sym(zeros(1, length(args)));
  3 件のコメント
Jiawei Gong
Jiawei Gong 2021 年 1 月 27 日
Thank you very much, gentlemen. The issue was exactly the overriding built-in with my own. Appreciate the swift answers.

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

その他の回答 (0 件)

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by