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.
댓글 수: 0
채택된 답변
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
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 Center 및 File Exchange에서 Calculus에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!