怎么用MATLAB求解隐性函数方程有一个很简单的方程我用MATLAB解不出,如下:q=0;s=('70*cos(q)+130*(1-(90*sin(p)-70*sin(q))/130)^0.5-90*cos(p)=150');p=solve('s')我想解是"P"值,最后得出的系空值,是不是最后一步的问

来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/24 20:20:01
怎么用MATLAB求解隐性函数方程有一个很简单的方程我用MATLAB解不出,如下:q=0;s=(''70*cos(q)+130*(1-(90*sin(p)-70*sin(q))/130)^0.5-90*

怎么用MATLAB求解隐性函数方程有一个很简单的方程我用MATLAB解不出,如下:q=0;s=('70*cos(q)+130*(1-(90*sin(p)-70*sin(q))/130)^0.5-90*cos(p)=150');p=solve('s')我想解是"P"值,最后得出的系空值,是不是最后一步的问
怎么用MATLAB求解隐性函数方程
有一个很简单的方程我用MATLAB解不出,如下:
q=0;
s=('70*cos(q)+130*(1-(90*sin(p)-70*sin(q))/130)^0.5-90*cos(p)=150');
p=solve('s')
我想解是"P"值,最后得出的系空值,是不是最后一步的问题?
q=0;
s=('70*cos(q)+130*(1-(90*sin(p)-70*sin(q))/130)^0.5-90*cos(p)=150');
>> p=solve(s)
Quit:
Error using ==> maple
at offset 7,`]` unexpected
Error in ==> D:\应用程序\MATLAB1\toolbox\symbolic\@sym\findsym.m
On line 53 ==> v = maple(['sort(',v,',lexorder)']);
Error in ==> D:\应用程序\MATLAB1\toolbox\symbolic\solve.m
On line 97 ==> vars = ['[' findsym(sym(eqns),neqns) ']'];
按你们俩个说的再试了一遍,出现以上两种错误,还是不行,

怎么用MATLAB求解隐性函数方程有一个很简单的方程我用MATLAB解不出,如下:q=0;s=('70*cos(q)+130*(1-(90*sin(p)-70*sin(q))/130)^0.5-90*cos(p)=150');p=solve('s')我想解是"P"值,最后得出的系空值,是不是最后一步的问
solve是解解析解的,如果没有解析解,就返回空值.
没有解析解,可用fsolve解数值解.
另外用solve时,定义全要符号变量:
syms p q s
s=70*cos(q)+130*(1-(90*sin(p)-70*sin(q))/130)^0.5-90*cos(p)=150
subs(s,q,0) % 把q换成0
ans =
130*(1 - (9*sin(p))/13)^(1/2) - 90*cos(p) - 80
>> solve(ans)
ans =

2*atan(39/112 - ((7439*(9*((13*2^(1/2)*3^(1/2)*649357^(1/2))/10976 + 175451/84672)^(2/3) - (27975*((13*2^(1/2)*3^(1/2)*649357^(1/2))/10976 + 175451/84672)^(1/3))/3136 - 7439/784)^(1/2))/784 - 9*((13*2^(1/2)*3^(1/2)*649357^(1/2))/10976 + 175451/84672)^(2/3)*(9*((13*2^(1/2)*3^(1/2)*649357^(1/2))/10976 + 175451/84672)^(2/3) - (27975*((13*2^(1/2)*3^(1/2)*649357^(1/2))/10976 + 175451/84672)^(1/3))/3136 - 7439/784)^(1/2) - (27975*((13*2^(1/2)*3^(1/2)*649357^(1/2))/10976 + 175451/84672)^(1/3)*(9*((13*2^(1/2)*3^(1/2)*649357^(1/2))/10976 + 175451/84672)^(2/3) - (27975*((13*2^(1/2)*3^(1/2)*649357^(1/2))/10976 + 175451/84672)^(1/3))/3136 - 7439/784)^(1/2))/1568 - (99333*6^(1/2)*((351*2^(1/2)*3^(1/2)*649357^(1/2))/5488 + 175451/1568)^(1/2))/175616)^(1/2)/(6*((13*2^(1/2)*3^(1/2)*649357^(1/2))/10976 + 175451/84672)^(1/6)*(9*((13*2^(1/2)*3^(1/2)*649357^(1/2))/10976 + 175451/84672)^(2/3) - (27975*((13*2^(1/2)*3^(1/2)*649357^(1/2))/10976 + 175451/84672)^(1/3))/3136 - 7439/784)^(1/4)) - (9*((13*2^(1/2)*3^(1/2)*649357^(1/2))/10976 + 175451/84672)^(2/3) - (27975*((13*2^(1/2)*3^(1/2)*649357^(1/2))/10976 + 175451/84672)^(1/3))/3136 - 7439/784)^(1/2)/(6*((13*2^(1/2)*3^(1/2)*649357^(1/2))/10976 + 175451/84672)^(1/6)))
2*atan(((7439*(9*((13*2^(1/2)*3^(1/2)*649357^(1/2))/10976 + 175451/84672)^(2/3) - (27975*((13*2^(1/2)*3^(1/2)*649357^(1/2))/10976 + 175451/84672)^(1/3))/3136 - 7439/784)^(1/2))/784 - 9*((13*2^(1/2)*3^(1/2)*649357^(1/2))/10976 + 175451/84672)^(2/3)*(9*((13*2^(1/2)*3^(1/2)*649357^(1/2))/10976 + 175451/84672)^(2/3) - (27975*((13*2^(1/2)*3^(1/2)*649357^(1/2))/10976 + 175451/84672)^(1/3))/3136 - 7439/784)^(1/2) - (27975*((13*2^(1/2)*3^(1/2)*649357^(1/2))/10976 + 175451/84672)^(1/3)*(9*((13*2^(1/2)*3^(1/2)*649357^(1/2))/10976 + 175451/84672)^(2/3) - (27975*((13*2^(1/2)*3^(1/2)*649357^(1/2))/10976 + 175451/84672)^(1/3))/3136 - 7439/784)^(1/2))/1568 - (99333*6^(1/2)*((351*2^(1/2)*3^(1/2)*649357^(1/2))/5488 + 175451/1568)^(1/2))/175616)^(1/2)/(6*((13*2^(1/2)*3^(1/2)*649357^(1/2))/10976 + 175451/84672)^(1/6)*(9*((13*2^(1/2)*3^(1/2)*649357^(1/2))/10976 + 175451/84672)^(2/3) - (27975*((13*2^(1/2)*3^(1/2)*649357^(1/2))/10976 + 175451/84672)^(1/3))/3136 - 7439/784)^(1/4)) - (9*((13*2^(1/2)*3^(1/2)*649357^(1/2))/10976 + 175451/84672)^(2/3) - (27975*((13*2^(1/2)*3^(1/2)*649357^(1/2))/10976 + 175451/84672)^(1/3))/3136 - 7439/784)^(1/2)/(6*((13*2^(1/2)*3^(1/2)*649357^(1/2))/10976 + 175451/84672)^(1/6)) + 39/112)
2*atan((9*((13*2^(1/2)*3^(1/2)*649357^(1/2))/10976 + 175451/84672)^(2/3) - (27975*((13*2^(1/2)*3^(1/2)*649357^(1/2))/10976 + 175451/84672)^(1/3))/3136 - 7439/784)^(1/2)/(6*((13*2^(1/2)*3^(1/2)*649357^(1/2))/10976 + 175451/84672)^(1/6)) - ((7439*(9*((13*2^(1/2)*3^(1/2)*649357^(1/2))/10976 + 175451/84672)^(2/3) - (27975*((13*2^(1/2)*3^(1/2)*649357^(1/2))/10976 + 175451/84672)^(1/3))/3136 - 7439/784)^(1/2))/784 - 9*((13*2^(1/2)*3^(1/2)*649357^(1/2))/10976 + 175451/84672)^(2/3)*(9*((13*2^(1/2)*3^(1/2)*649357^(1/2))/10976 + 175451/84672)^(2/3) - (27975*((13*2^(1/2)*3^(1/2)*649357^(1/2))/10976 + 175451/84672)^(1/3))/3136 - 7439/784)^(1/2) - (27975*((13*2^(1/2)*3^(1/2)*649357^(1/2))/10976 + 175451/84672)^(1/3)*(9*((13*2^(1/2)*3^(1/2)*649357^(1/2))/10976 + 175451/84672)^(2/3) - (27975*((13*2^(1/2)*3^(1/2)*649357^(1/2))/10976 + 175451/84672)^(1/3))/3136 - 7439/784)^(1/2))/1568 + (99333*6^(1/2)*((351*2^(1/2)*3^(1/2)*649357^(1/2))/5488 + 175451/1568)^(1/2))/175616)^(1/2)/(6*((13*2^(1/2)*3^(1/2)*649357^(1/2))/10976 + 175451/84672)^(1/6)*(9*((13*2^(1/2)*3^(1/2)*649357^(1/2))/10976 + 175451/84672)^(2/3) - (27975*((13*2^(1/2)*3^(1/2)*649357^(1/2))/10976 + 175451/84672)^(1/3))/3136 - 7439/784)^(1/4)) + 39/112)
2*atan((9*((13*2^(1/2)*3^(1/2)*649357^(1/2))/10976 + 175451/84672)^(2/3) - (27975*((13*2^(1/2)*3^(1/2)*649357^(1/2))/10976 + 175451/84672)^(1/3))/3136 - 7439/784)^(1/2)/(6*((13*2^(1/2)*3^(1/2)*649357^(1/2))/10976 + 175451/84672)^(1/6)) + ((7439*(9*((13*2^(1/2)*3^(1/2)*649357^(1/2))/10976 + 175451/84672)^(2/3) - (27975*((13*2^(1/2)*3^(1/2)*649357^(1/2))/10976 + 175451/84672)^(1/3))/3136 - 7439/784)^(1/2))/784 - 9*((13*2^(1/2)*3^(1/2)*649357^(1/2))/10976 + 175451/84672)^(2/3)*(9*((13*2^(1/2)*3^(1/2)*649357^(1/2))/10976 + 175451/84672)^(2/3) - (27975*((13*2^(1/2)*3^(1/2)*649357^(1/2))/10976 + 175451/84672)^(1/3))/3136 - 7439/784)^(1/2) - (27975*((13*2^(1/2)*3^(1/2)*649357^(1/2))/10976 + 175451/84672)^(1/3)*(9*((13*2^(1/2)*3^(1/2)*649357^(1/2))/10976 + 175451/84672)^(2/3) - (27975*((13*2^(1/2)*3^(1/2)*649357^(1/2))/10976 + 175451/84672)^(1/3))/3136 - 7439/784)^(1/2))/1568 + (99333*6^(1/2)*((351*2^(1/2)*3^(1/2)*649357^(1/2))/5488 + 175451/1568)^(1/2))/175616)^(1/2)/(6*((13*2^(1/2)*3^(1/2)*649357^(1/2))/10976 + 175451/84672)^(1/6)*(9*((13*2^(1/2)*3^(1/2)*649357^(1/2))/10976 + 175451/84672)^(2/3) - (27975*((13*2^(1/2)*3^(1/2)*649357^(1/2))/10976 + 175451/84672)^(1/3))/3136 - 7439/784)^(1/4)) + 39/112)
看来有解析解,算了二十秒~~~
转化成数值
double(ans)~~~~又用了二十秒
ans =
2.6198 - 1.5555i
2.6198 + 1.5555i
-0.6117
1.6553
一共有四个解
你上面的问题,s已经先定义为字符串了,为什么solve时还要加''.

q=0;
s=sym('70*cos(q)+130*(1-(90*sin(p)-70*sin(q))/130)^0.5-90*cos(p)=150');
p=solve(s,'q')

很easy啊,你把最后一句改成p=solve(s),保证ok!!

怎么用MATLAB求解隐性函数方程有一个很简单的方程我用MATLAB解不出,如下:q=0;s=('70*cos(q)+130*(1-(90*sin(p)-70*sin(q))/130)^0.5-90*cos(p)=150');p=solve('s')我想解是P值,最后得出的系空值,是不是最后一步的问 求用matlab求解方程 matlab怎么求解字母表示的高次方程,因方程中带有log函数,且底是高次的,solve函数解不出来,有他办法? 用matlab怎么求解含有三角函数的非线性方程 怎么用matlab求解二维热传导方程啊 能求出第一个方程也好 我都快崩溃了 怎么用MATLAB做个简单的GUI?前几天答应尝试帮一个同学做个作业.用matlab做一个简单的界面,输入一个一元二次方程,画图函数图形以及算出答案.我翻了matlab的教程,懂怎么求解方程以及画图了,就 matlab 求解积分方程想要用matlab求一下积分方程.方程是这样的 :一个积分=一个定值积分中被积函数是已知的,下限未知,上限已知通过这个方程求一下这个下限值,请问怎么实现啊? 用Matlab 求解分段函数方程组分段函数是if Xp一共两个方程,一个是分段函数,另外的是一个圆的方程。分段函数的代码我已经写出来了,圆的方程在它的下面,问题是怎么求这个方程组, MATLAB求解指数方程,((1.2554*10^6)/1.01-10)*(1.01^x)+10=0怎么用MATLAB求解啊, Matlab求解该方程解Y和T都是一个大小为m的数组,MatLab程序该怎么写? matlab 方程求解求解 谢谢 matlab用符号函数法求解方程at2+b*t+c=0. 怎么用matlab 求解矩阵方程怎么编程呢 或者怎么算呢 用MATLAB解一个3元一次微分方程求解曲线,急用,方程为以下得到z-Theta的函数曲线谢谢! 用MATLAB求解方程cos(x)*cosh(x)=-1,在1.8附近的精确解.是不是用fzero函数,具体怎么编? 怎么在matlab中求解方程1+cosx*chx=0(需要方程前十个x值较小的解,ch函数在matlab中是cosh) 【求助】matlab函数作图问题用matlab求解线性方程组,如果有一个19次高阶方程,y=a*x^19+a1*x^18+……+a18*x+d,同时你有对应的20个(x,y)数据,那么通过矩阵可以解出方程的各个参数,这样解出来之后我 matlab 求解一个含参数方程代码我在用Matlab的时候遇上这么一个问题.现在简化一下,问题大概是这样的:有一个一个函数f(x;a) = x + a,这里,x是自变量,a是一个参数,现在给定一个参数a,要求f(x;a) =