我试图解决下面的等式x。
S = solve('1./sqrt(x-1)','x');
某种程度上根本不起作用。我还尝试了使用syms x
有没有一种简单的方法来解决这个问题?提前谢谢!
错误讯息:
Warning: Support of strings that are not valid variable names or define a
number will be removed in a future release. To create symbolic
expressions, first create symbolic variables and then use operations on
them.
> In sym>convertExpression (line 1536)
In sym>convertChar (line 1441)
In sym>tomupad (line 1198)
In sym (line 177)
In solve>getEqns (line 405)
In solve (line 225)
Error using symengine
Invalid input. 'expression' is expected.
Error in sym>convertExpression (line 1543)
s = mupadmex({x});
Error in sym>convertChar (line 1441)
s = convertExpression(x);
Error in sym>tomupad (line 1198)
S = convertChar(x);
Error in sym (line 177)
S.s = tomupad(x);
Error in solve>getEqns (line 405)
a = sym(a);
Error in solve (line 225)
[eqns,vars,options] = getEqns(varargin{:});
答案 0 :(得分:1)
使用正确的方式调用solve
:
syms x real
S = solve((x-1)^-0.5 == 0, x);
按照此处的建议:http://www.mathworks.com/help/symbolic/solve.html
或者,甚至更简单:
x = 1; % :-)
答案 1 :(得分:-1)
syms x y
solve('y = 1/(x-1)',x)