matlab如何编程求解下面的方程得出x的解。
a=3;
b=5;
x=a*sqrt(x+1)+b;
这里编程时a和b的值请不要直接代入x=a*sqrt(x+1)+b,请问怎么编程?(因为我要编的类似的方程很复杂,这个只是抽象出来的,因此系数不能直接用数值代入)
我自己编的程序如下:
a=3;
b=5;
solve('a*sqrt(x+1)+b-x','x')
求解后提示如下错误:
警告: Do not specify equations and variables as character strings. Instead, create symbolic variables with syms.
> In solve>getEqns (line 445)
In solve (line 225)
|
|