[已答复] 一阶偏微分方程,求帮忙看下程序

[复制链接]
zsmj12 发表于 2013-7-1 10:47:08
du/dy=-0.035d2u/d2x+0.00014(du/dx)^2
以上du/dy为偏倒数d2u/d2x为2次偏倒:
初始和边界条件为
x = 0 u = 5000K,
x = L u = 2000K,L = 10m,
t = 0 u = 5000K.
程序如下
function [c,f,s] = pdexvvpde(x,t,u,DuDx)
c = 1;
f = -0.035.*DuDx;
s =0.00014.*(DuDx)^2 ;
function [pl,ql,pr,qr] = pdexvvbc(xl,ul,xr,ur,t)
pl = ul-5000;
ql = 0;
pr = ur-2000;
qr = 0.00001;
function u0 = pdexvvic(x)
u0 = 5000;
function pdexvv
m = 0;
x = linspace(0,0.000001,100);
t = linspace(0,0.6,50000);
%u = linspace(2000,5000,6);
sol = pdepe(m,@pdexvvpde,@pdexvvic,@pdexvvbc,x,t);
u = sol(:,:,1);
figure
plot(x,u(end,:),'-r')
title('Numerical solution and exact solution.')
xlabel('x')
ylabel('u(x,end)')存在问题,希望帮忙改改

1 条回复


math 发表于 2013-7-2 03:31:11
直接给出错误信息即可:https://www.ilovematlab.cn/thread-107902-1-1.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则

相关帖子
热门教程
站长推荐
快速回复 返回顶部 返回列表