我是去百度了solve用法,但是运行的时候一直显示错误,
我最先给a,b赋值进行计算,但是一直显示运算符错误
syms x y;
>>[x ,y]=solve(' 0.709133=[1+(0.0172*x)^2]^(-y/2)','0.08555=y*arctan(0.0172*x)');
然后使用了未赋值
clc,clear
syms a b y x
sola=solve(a==(1+(0.0172*x)^2)^(-y/2),x) %待求解的变量是x
sol=solve(b==y*atan(0.0172*x),y) %待求解的变量是y
还是运算不出想要的东西
因为只会一点点matlab,就一直解决不了问题。
Warning: The solutions are parameterized by the symbols: z, z1. To include parameters and conditions in the solution, specify the
'ReturnConditions' option.
> In solve>warnIfParams (line 510)
In solve (line 367)
Warning: The solutions are valid under the following conditions: 1/((1849*z^2)/6250000 + 1)^(z1/2) -
6387302814580195/9007199254740992 == 0 & z1*atan((43*z)/2500) - 1711/20000 == 0 & 0 < z & 0 < z1. To include parameters and
conditions in the solution, specify the 'ReturnConditions' option.
> In solve>warnIfParams (line 517)
In solve (line 367)
。
这个尽量不要做伸手党,求解符号方程组,看看solve函数用法
我是去百度了solve用法,但是运行的时候一直显示错误,
我最先给a,b赋值进行计算,但是一直显示运算符错误
syms x y;
>>[x ,y]=solve(' 0.709133=[1+(0.0172*x)^2]^(-y/2)','0.08555=y*arctan(0.0172*x)');
然后使用了未赋值
clc,clear
syms a b y x
sola=solve(a==(1+(0.0172*x)^2)^(-y/2),x) %待求解的变量是x
sol=solve(b==y*atan(0.0172*x),y) %待求解的变量是y
还是运算不出想要的东西
因为只会一点点matlab,就一直解决不了问题。
clear;
syms a b
syms x y positive
eqns=[(1+(0.0172*x)^2)^(-y/2)-a==0, y*atan(0.0172*x)-b==0];
[X,Y]=solve(eqns,[x y])
这个可能是方程有点问题吧。 a b 的具体数值是多少
0.709133065 0.08555
0.245947581 0.23527
0.679383641 0.63827
0.32593606 0.51032
0.208709677 0.53469
a和b的值如上,比较小,我也不清楚能不能解出来。
我自己又代入了一下,得到这样的结果,是什么意思呢?
Warning: The solutions are parameterized by the symbols: z, z1. To include parameters and conditions in the solution, specify the
'ReturnConditions' option.
> In solve>warnIfParams (line 510)
In solve (line 367)
Warning: The solutions are valid under the following conditions: 1/((1849*z^2)/6250000 + 1)^(z1/2) -
6387302814580195/9007199254740992 == 0 & z1*atan((43*z)/2500) - 1711/20000 == 0 & 0 < z & 0 < z1. To include parameters and
conditions in the solution, specify the 'ReturnConditions' option.
> In solve>warnIfParams (line 517)
In solve (line 367)
X =
z
Y =
z1
,
初始值变化很大,用 vpasolve 函数赋初始值
clear;
a=0.709133065;b=0.08555;
syms x y positive
eqns=[(1+(0.0172*x)^2)^(-y/2)-a==0, y*atan(0.0172*x)-b==0];
[X,Y]=vpasolve(eqns,[x y],[30000;0.05])