syms x - Not enough input arguments.
3 次查看(过去 30 天)
显示 更早的评论
>> 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.
0 个评论
采纳的回答
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 个评论
Steven Lord
2021-1-27
I agree this is the likely cause. Line 3 of the digits.m included in Symbolic Math Toolbox is part of the function help text, not executable code. Rename your digits.m file (not the one in Symbolic Math Toolbox.)
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!