Not enough input arguments
조회 수: 1 (최근 30일)
이전 댓글 표시
Hi, I cant understand why this wont run and what is meant by not enough input arguments. please help here is my code.
syms e q n
c=0;
g(n)=e/(2*(q+(1i*n*c)-((n)^2)));
N = 17;
l_start = ((N-1)/2)-2;
u_start = (N-1)/2;
l_end = l_start-N+3;
u_end = u_start-N+3;
f = diag(ones(1,N)) + diag(g(l_start:-1:l_end), -2) + diag(g(u_start:-1:u_end), 2);
F=det(f)==0;
F = det(F);
fimplicit(F)
xlabel 'epsilon'
ylabel 'omega'
xlim([0 5])
ylim([0 10])
the error codes i recieve are
% Not enough input arguments.
%
% Error in sym (line 191)
% n
%
% Error in syms (line 227)
% defined = sym(zeros(1, length(args)));
%
% Error in base2 (line 1)
% syms e q n
댓글 수: 1
Sriram Tadavarty
2020년 7월 29일
Hi Seb,
Can you clear all the workspace and try? I see the output for your code placed and no errors.
Regards,
Sriram
답변 (1개)
Steven Lord
2020년 7월 29일
I suspect you've written or downloaded a sym.m that's taking precedence over the one included in Symbolic Math Toolbox. In my installation of release R2020a line 191 of sym.m is not just the letter n.
To check this, use the which function.
which -all sym
If that command shows other sym.m files that are not underneath matlabroot, rename them.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!