MATLAB的solvepde函数能求解复数方程么
复数也是一样的
先把格式转化下
format rat
再用solve函数,可以实现的
你的程序中Vn = vpa(S1(1))使结果出现错觉,实际情况是:
H1 = 231.2960*atan(x^2/(15.8*sqrt(62.5-x^2)))-L;
S1 = solve(H1,x);
Vn = vpa(S1);
subs(Vn,L,1816),subs(Vn,L,1817)
ans =
1.0e+003 *
0.0079
-0.0079
0.0000 + 6.1468i
-0.0000 - 6.1468i
ans =
1.0e+003 *
0.0079
-0.0079
0.0000 + 9.0131i
-0.0000 - 9.0131i
也就是方程有4个根,两个实根,两个复根,L=1816与L=1817均有4个根
solvepde
Solve PDE specified in a PDEModel
collapse all in page
Syntax
result = solvepde(model)
result = solvepde(model,tlist)
Description
example
result = solvepde(model) returns the solution to the stationary PDE represented in model. A stationary PDE has the property model.IsTimeDependent = false. That is, the time-derivative coefficients m and d in model.EquationCoefficients must be 0.
example
result = solvepde(model,tlist) returns the solution to the time-dependent PDE represented in model at the times tlist. At least one time-derivative coefficient m or d in model.EquationCoefficients must be nonzero.
Examples
collapse all
Solve a Stationary Problem: Poisson's Equation for the L-shaped Membrane
Try This Example
Create a PDE model, and include the geometry of the L-shaped membrane.
model = createpde();
geometryFromEdges(model,@lshapeg);
View the geometry with edge labels.
pdegplot(model,'EdgeLabels','on')
ylim([-1.1,1.1])
axis equal
Set zero Dirichlet conditions on all edges.
applyBoundaryCondition(model,'dirichlet','Edge',1:model.Geometry.NumEdges,'u',0);
Poisson's equation is
Toolbox solvers address equations of the form
Include the coefficients for Poisson's equation in the model.
specifyCoefficients(model,'m',0,...
'd',0,...
'c',1,...
'a',0,...
'f',1);
Mesh the model and solve the PDE.
generateMesh(model,'Hmax',0.25);
results = solvepde(model);
View the solution.
pdeplot(model,'XYData',results.NodalSolution)
龚曹信立: x1=1;x2=2;w=3;f=4; %假设它们的值是这些 g=10; y1=f*g; y2=-f*g; k=solve('-y2=(-8)*x2*w^2*(sin(k)+x1/(16*x2))^2+4*x2*w^2+((x1*w)^2)/(32*x2)','k') k=subs(k) 运行结果: k = asin(1/16/x2*(-x1*w+(x1^2*w^2+32*y2*x2+128*x2^2*w^2)^(1/2))/w) asin(1/16/x2*(-x1*w-(x1^2*w^2+32*y2*x2+128*x2^2*w^2)^(1/2))/w) k = 0.4569 -0.5279
金明区13925808159: matlab中solve函数的用法.悬赏20分?
龚曹信立: solve Symbolic solution of algebraic equations. solve('eqn1','eqn2',...,'eqnN') solve('eqn1','eqn2',...,'eqnN','var1,var2,...,varN') solve('eqn1','eqn2',...,'eqnN','var1','var2',...'varN') The eqns are symbolic expressions or strings specifying equations. The ...
金明区13925808159: MATLAB中用solve函数中取值进行比较遇到的困难 谢谢!!!!具体代码如下: - ?
龚曹信立: 我稍微改了一下.Detad=10; R=10; x1=15; y1=495; x2=15; y2=512; syms x3 y3; [x3,y3]=solve((x3-x2)^2+(y3-y2)^2==Detad^2,(x3-x1)^2+(y3-y1)^2==4*R^2,x3,y3) if x3(1)>y3(2) disp(x3(1)) disp(y3(2)) end
金明区13925808159: matlab 中关于solve函数应用 - ?
龚曹信立: clc;clear; syms w Rm=66.6; C0=629e-15; Cm=7.3e-15;Lm=113e-6; j=sqrt(-1); w=solve(1./((1./(j.*w.*Cm)+j.*w*Lm+Rm+1./(j.*w*C0))./(1./(j.*w*C0).*(1./(j.*w*Cm)+j.*w*Lm+Rm)))-1./Rm',w)
金明区13925808159: matlab多项式函数 - ?
龚曹信立: 在MATLAB中,solve函数主要是用来求解代数方程(多项式方程)的符号解析解 例如: syms a b c x; solve('a*x^2 + b*x + c')结果: ans = -(b + (b^2 - 4*a*c)^(1/2))/(2*a) -(b - (b^2 - 4*a*c)^(1/2))/(2*a)如果以b为变量: syms a b c x; solve('a*x^2 + b*x + c','b')结果: ans = -(a*x^2 + c)/x
金明区13925808159: 用matlab中的solve函数解一个三元二次方程组 - ?
龚曹信立: 其实多项式函数和指数函数在精度方面差异很大,而solve一般都是获取比较精确的解(计算机总存在精度问题).我运行了一下,感觉这道题应该是无解,我用你的
金明区13925808159: matlab 关于solve函数?
龚曹信立: 单引号里的东西是代表字符本身,系统不会认为它是一个变量或者数组名.solve('temp=1','p11')只会认为temp是要求解的未知量,结果是1,而你又要得到p11这个表达式里没有的东西,当然不可以咯.很简单,你把单引号去掉就可以了哦,此时等号也要去掉(右边默认为0)
金明区13925808159: matlab中solve的用法 - ?
龚曹信立: 把solve中的引号去掉就好,加引号代表string函数,x,y将以r,s符号表示,所以无法对其赋值 改后调用[ISp,ISn]=paper_IS1(2,3) 结果显示:ISp =[ 4.75, 4.30*i]ISn =[ 4.75, -4.30*i]
金明区13925808159: 使用matlab中的solve函数求解符号方程组的问题 - ?
龚曹信立: 不知你的什么版本,我是2011a就告诉我no explicit solution即无解析解.没有出现你这种情况.这个方程组就是求两圆交点,顶多有两组解,你仔细看解出来的x第一个和x第二个是一模一样的.后两个也是一样的.我以前用低版本的matlab(7.0.1...