syms x - Not enough input arguments.
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Jiawei Gong
el 27 de En. de 2021
Editada: Jiawei Gong
el 27 de En. de 2021
>> 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 comentarios
Respuesta aceptada
Cris LaPierre
el 27 de En. de 2021
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 comentarios
Steven Lord
el 27 de En. de 2021
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.)
Más respuestas (0)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!