我有两个根。 Er1
和Er2
。 Er1 = Er1r+(Er1i)*i
和Er2 = Er2r+(Er2i)*i
。所以它们很复杂。
syms Er1r Er1i Er2r Er2i real
Er1 = Er1r+(Er1i)*i
Er2 = Er2r+(Er2i)*i
Er = [Er1,Er2]
h = 0.0001
Er111 = (Er1r+h)+(Er1i)*i
Er112 = (Er1r-h)+(Er1i)*i
Er121 = (Er1r)+(Er1i+h)*i
Er122 = (Er1r)+(Er1i-h)*i
Er211 = (Er2r+h)+(Er2i)*i
Er212 = (Er2r-h)+(Er2i)*i
Er221 = (Er2r)+(Er2i+h)*i
Er222 = (Er2r)+(Er2i-h)*i
eqn1(Er) = 3*Er111^2+5*Er111+Er111
eqn2(Er) = 7*Er112^2-4*Er112+2*Er112
.
.
.
eqn8(Er) = 3*Er222^2+9*Er222-4*Er222
我想写8个方程式。但他们是功能。所以呃是象征。我有错误。我该如何解决?
错误讯息;
Error using sym/subsindex (line 766)
Invalid indexing or function definition. When defining a function, ensure that the arguments are symbolic variables and the body of
the function is a SYM expression. When indexing, the input must be numeric, logical, or ':'.
Error in sym/privsubsasgn (line 1031)
L_tilde2 = builtin('subsasgn',L_tilde,struct('type','()','subs',{varargin}),R_tilde);
Error in sym/subsasgn (line 868)
C = privsubsasgn(L,R,inds{:});
Error in m0708_2 (line 63)
eqn1(Er) = 3*Er111^2+5*Er111+Er111