奇迹世界单刷职业:请教一个matlab的solve函数的问题

来源:百度文库 编辑:高考问答 时间:2024/05/09 16:59:56
如果直接解这个方程:
[x,y]=solve('(x-0.26)^2+(y-0.02)^2=0.15^2','x=1+y^1.5');
是能够解出来的;
--------
但是用下面这个代码
a=0.26;
b=0.02;
c=0.15;
[x,y]=solve('(x-a)^2+(y-b)^2=c^2','x=1+y^1.5');
出现以下错误:
??? Error using ==> solve
Unable to find closed form solution.
---------
由于我要迭代解方程,里面a,b,c是不断变化的,要解这个方程应该怎么弄啊?

function [x0,y0]=sss(a,b,c)

if nargin <1
a=0.26;
b=0.02;
c=0.15;
end
syms x;
syms y;
temp1=(x-a)^2+(y-b)^2-c^2;
temp2=1+y^1.5-x;

[x0,y0]=solve(temp1,temp2);
x0=eval(x0);
y0=eval(y0);