필터 지우기
필터 지우기

Not enough input arguments

조회 수: 1 (최근 30일)
Seb apple
Seb apple 2020년 7월 29일
답변: Steven Lord 2020년 7월 29일
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
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
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.

태그

Community Treasure Hunt

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

Start Hunting!

Translated by