Why ('t=(2x+1)/(2x-2)','x') is unsolvable?

1 次查看(过去 30 天)
The code was:
solve('t=(2x+1)/(2x-2)','x')
t is an uncertain constant
The error message is:
Warning: Support of character vectors 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 1586)
In sym> convertChar (line 1491)
In sym> tomupad (line 1243)
In sym (line 199)
In solve> getEqns (line 406)
In solve (line 226)
Incorrect use of symengine
Unexpected 'identifier'.
Error sym> convertExpression (line 1593)
s = mupadmex ((x));
Error sym> convertChar (line 1491)
s = convertExpression (x);
Error sym> tomupad (line 1243)
S = convertChar (x);
Error sym (line 199)
S.s = tomupad (x);
Error solve> getEqns (line 406)
a = sym (a);
Error solve (line 226)
[eqns, vars, options] = getEqns (varargin {:});
The solution I want to get is a formula containing 't' and use 't' to calculate 'x'
I also tried to solve another equation
solvesolve ('v-u-3 * t ^ 2 = 0', 'v')
The result was
ans =
3 * t ^ 2 + u
I want to get this formula that uses parameters to represent unknowns, rather than x for a particular t.

采纳的回答

Star Strider
Star Strider 2020-1-22
Correct syntax:
syms t x
solve(t==(2*x+1)/(2*x-2),x)
producing:
ans =
(2*t + 1)/(2*t - 2)
  1 个评论
Walter Roberson
Walter Roberson 2020-1-22
The above is the better way. However in your release you can also
solve('t=(2*x+1)/(2*x-2)','x')
This is not possible in newer versions of MATLAB, only in older versions.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Calculus 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by