MATLAB: (‘t=(2x+1)/(2x-2)’,’x’) is unsolvable

solveunexpected 'identifier'

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.

Best Answer

Correct syntax:
syms t x
solve(t==(2*x+1)/(2*x-2),x)
producing:
ans =
(2*t + 1)/(2*t - 2)