使用matlab中的solve函数求解符号方程组的问题我在matlab中输入如下:>> syms x y xp yp xi yi min;>> f1='(x-xp)^2+(y-yp)^2=min^2';>> f2='(x-xi)^2+(y-yi)^2=3*min^2';>> [x,y]=solve(f1,f2)求解的结果是x =xp+(-yp^2+min^2-y^2+2*y*y

来源:学生作业帮助网 编辑:作业帮 时间:2024/11/05 21:48:15
使用matlab中的solve函数求解符号方程组的问题我在matlab中输入如下:>> syms x y xp yp xi yi min;>> f1='(x-xp)^2+(y-yp)^2=min^2';>> f2='(x-xi)^2+(y-yi)^2=3*min^2';>> [x,y]=solve(f1,f2)求解的结果是x =xp+(-yp^2+min^2-y^2+2*y*y
xXRVXHK"fH'hOm4\CBjM m I~/td(L:sm>vrn4Ճ'Ï{7?3td9So|欟nm*R^!w7Svec=?8([O%S$3)YI4$ːc?@61U35KC&׸e mk<0C+#ZqkϝY63)G^jMZQO&}f3L&"|nW Gz9L D$-o~1-[ "UGy [ba!>Hu+N!cWOYqRYE4 ;rn֋-3_^R,A`md ʑ`,hmA:Yl/Sҝ9E =gE?[0ج+&`bΩVH3hfBylZn9<6..P)6=2{К> k?ϟzsQ[L6 _բ5T2Uaew_S=E#*ӅUJe;ސ.P$;}C:0N7(ua$ [Oc enTp(/op>$ }]Mh'pg.Ņ\NA\߼s/gz6D_TtY h+} b8QԙUKĤ$p: Hc]:$xoЁX>5o]|FSƤbbsE8phá+&j ׿p!ۺá 6fx/g` <knxKWu;Y/s

使用matlab中的solve函数求解符号方程组的问题我在matlab中输入如下:>> syms x y xp yp xi yi min;>> f1='(x-xp)^2+(y-yp)^2=min^2';>> f2='(x-xi)^2+(y-yi)^2=3*min^2';>> [x,y]=solve(f1,f2)求解的结果是x =xp+(-yp^2+min^2-y^2+2*y*y
使用matlab中的solve函数求解符号方程组的问题
我在matlab中输入如下:
>> syms x y xp yp xi yi min;
>> f1='(x-xp)^2+(y-yp)^2=min^2';
>> f2='(x-xi)^2+(y-yi)^2=3*min^2';
>> [x,y]=solve(f1,f2)
求解的结果是x =
xp+(-yp^2+min^2-y^2+2*y*yp)^(1/2)
xp+(-yp^2+min^2-y^2+2*y*yp)^(1/2)
xp-(-yp^2+min^2-y^2+2*y*yp)^(1/2)
xp-(-yp^2+min^2-y^2+2*y*yp)^(1/2)
y=
xp+(-yp^2+min^2-y^2+2*y*yp)^(1/2)+(2*y*yi-yi^2+3*min^2-y^2)^(1/2)
xp+(-yp^2+min^2-y^2+2*y*yp)^(1/2)-(2*y*yi-yi^2+3*min^2-y^2)^(1/2)
xp-(-yp^2+min^2-y^2+2*y*yp)^(1/2)+(2*y*yi-yi^2+3*min^2-y^2)^(1/2)
xp-(-yp^2+min^2-y^2+2*y*yp)^(1/2)-(2*y*yi-yi^2+3*min^2-y^2)^(1/2)
x和y应该只有两组解,怎么出来四组了呢?更大问题是x,y的表达式中还含有x,y本身,请问各位这是怎么回事啊?

使用matlab中的solve函数求解符号方程组的问题我在matlab中输入如下:>> syms x y xp yp xi yi min;>> f1='(x-xp)^2+(y-yp)^2=min^2';>> f2='(x-xi)^2+(y-yi)^2=3*min^2';>> [x,y]=solve(f1,f2)求解的结果是x =xp+(-yp^2+min^2-y^2+2*y*y
不知你的什么版本,我是2011a就告诉我no explicit solution即无解析解.没有出现你这种情况.
这个方程组就是求两圆交点,顶多有两组解,你仔细看解出来的x第一个和x第二个是一模一样的.后两个也是一样的.我以前用低版本的matlab(7.0.1),似乎得到过你这样的解,但是现在用新版本的做就没有这样的问题.
no explicit solution的话,需要求数值解了(matlab说没解析解,不等于你就算不出来了,它经常会告诉你没解析解的,不要吃惊).其实你这里手算很好算的,何必让电脑去帮你做.matlab符号解方程的能力非常有限,只能够解很简单的有解析解的方程,它的优势在于数值运算,就是你给出除了x,y以外其他变量的数值然后让它解.

>> syms x y xp yp xi yi min
f1=(x-xp)^2+(y-yp)^2-min^2;
f2=(x-xi)^2+(y-yi)^2-3*min^2;
D=solve(f1,f2,x,y)
D =
x: [2x1 sym]
y: [2x1 sym]
>> D.x

ans =
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*xp^2*yi^2*min^2+12*yp^2*yi^2*xi*xp-8*yp^3*yi*xi*xp-16*min^2*yp*xp^2*yi-16*min^2*yp^2*xi*xp-16*min^2*yp*xi^2*yi-16*xi*xp^3*yp*yi-yp^4*xi^2-2*xp^4*yi^2-xp^2*yi^4+24*xi^2*yi*xp^2*yp-16*xi^3*yi*xp*yp-xp^6-xi^6-2*xi^4*yi^2-xi^2*yi^4-8*xi*xp*yp*yi^3-yp^4*xp^2-16*xi*xp*yi^2*min^2+8*xi^3*xp*yp^2+32*min^2*yp*xi*xp*yi+6*xi^5*xp-4*xi^2*min^4+8*xi^4*min^2-4*xp^2*min^4+8*xp^4*min^2+6*xi*xp^5+20*xi^3*xp^3-15*xi^2*xp^4-15*xi^4*xp^2-2*xp^4*yp^2-2*yp^2*xi^4)^(1/2))/(-2*xi*xp-2*yp*yi+yp^2+yi^2+xp^2+xi^2)


>>

收起

MATLAB,solve函数, matlab新手求解3:solve函数.我输入solve('x^3+5*x-8'),结果求得三个解:.我只想使用第一个解,如何将其从solve()中提取出来.输入[a b c ]=solve('x^3+5*x-8')时matlab报错,查了资料才知道solve函数的返回值 使用matlab中的solve函数求解符号方程组的问题我在matlab中输入如下:>> syms x y xp yp xi yi min;>> f1='(x-xp)^2+(y-yp)^2=min^2';>> f2='(x-xi)^2+(y-yi)^2=3*min^2';>> [x,y]=solve(f1,f2)求解的结果是x =xp+(-yp^2+min^2-y^2+2*y*y 请问matlab中的spectrum函数怎么使用? matlab里solve如何使用,是否有别的函数可以代替它? 在Matlab 中 使用solve函数求解二元二次方程组clcclear allsyms x yequation1=1351504793280023/309485009821345068724781056 - (y*conj(y))/4 - (252750694268921*3^(1/2)*x*y)/562949953421312 - (3*x*conj(x))/4 ;equation2=8059982666094291/9903520 为什么solve函数后matlab无反应 matlab中使用龙格库塔法求解 x^2+1=c;已知c=[2 5 10],请问在matlab中如何使用for循环和solve函数,通过循环,求解每个c所求解每个c所对应的x.由于我要做的是4次的方程求解,所以想先从一次或者两次来开始慢慢做.如果您能加上 matlab solve 函数 利用matlab solve 函数求解多元二次方程,答案里有多个解,但实际结果只有一个.如何在程序里排除其他选项.如 需要答案大于0 ,没有虚值,等等. '如何用matlab求解 4*x.^4-4*x.^2 =0的解,好像matlab不能计算,至少fzero和solve函数解不出来, matlab求解:40*x+1-exp(x/2)=0.我用solve函数求解,只得出0解,哪位大神可以帮忙解决一下?谢谢 求教matlab大神,solve函数如何得到数值解并将解复制给变量我使用matlab求解一元二次方程,得出来的只是解析解,我想得到数值解,且把每个数值解幅值给变量,或者可以实现每个解的调用,我的程 matlab怎么求解字母表示的高次方程,因方程中带有log函数,且底是高次的,solve函数解不出来,有他办法? 一个MATLAB中求解方程solve函数,一直错误,我用MATLAB中solve函数求解时,如下式:[h]=solve('(h.*(sqrt(z2.^2+(r11-h).^2)))./((r11-h).*(sqrt(z1.^2+h.^2)))=c1/c2');其中,z1,r11,c1,c2都是已知的,为啥运行说是一个无效的 关于matlab解多元一次方程组的问题如果方程组中含有求和符号应该怎么求解?还是用solve函数吗? 怎样用matlab求解这样的函数?我想求解方程:0.133=x*tanh(10*x),输入指令 x=solve('0.133=x*tanh(10*x)','x')后却得到了结果x = matrix([[-0.14764608060024211252258489022291]])因为式中的x是具有物理意义的,应该是一 matlab中solve函数不能用的原因