24小时热门版块排行榜    

查看: 411  |  回复: 1

zpzgraduate

铁杆木虫 (著名写手)

[求助] matlab求解偏微分方程组遇到的问题求助

求解偏微分方程组时遇到的,请高手指点。
下面是文件和错误提示
function pdex4
m = 0;
x = [0 0.005 0.01 0.05 0.1 0.2 0.5 0.7 0.9 0.95 0.99 0.995 1];
t = [0 0.005 0.01 0.05 0.1 0.5 1 1.5 2];

sol = pdepe(m,@pdex4pde,@pdex4ic,@pdex4bc,x,t);
u1 = sol(:,:,1);
u2 = sol(:,:,2);
u3=sol(:,:,2);

figure
surf(x,t,u1)
title('u1(x,t)')
xlabel('Distance x')
ylabel('Time t')

figure
surf(x,t,u2)
title('u2(x,t)')
xlabel('Distance x')
ylabel('Time t')
figure
surf(x,t,u3)
title('u3(x,t)')
xlabel('Distance x')
ylabel('Time t')
% --------------------------------------------------------------
function [c,f,s] = pdex4pde(x,t,u,DuDx)
c = [1; 1;1];
f = [0; 0;0] .* DuDx;
F = 6*u(3);
s = [-F*u(1); u(2)*F;-20000*u(1)-2-4*u(2)];
% --------------------------------------------------------------
function u0 = pdex4ic(x);
u0 = [0.03;0;0];
% --------------------------------------------------------------
function [pl,ql,pr,qr] = pdex4bc(xl,ul,xr,ur,t)
pl = [0; ul(2)-1;0];
ql = [1; 1;1];
pr = [ur(1)-1; 0;0];
qr = [1;1;1];


错误信息
Warning: Failure at t=1.497828e-002.  Unable to meet integration tolerances
without reducing the step size below the smallest value allowed (2.775558e-017) at
time t.
> In ode15s at 809
  In pdepe at 317
  In pdefun001 at 6
Warning: Time integration has failed. Solution is available at requested time
points up to t=1.000000e-002.
> In pdepe at 323
  In pdefun001 at 6
??? Error using ==> surf at 78
Data dimensions must agree.

Error in ==> pdefun001 at 12
surf(x,t,u1)
回复此楼

» 猜你喜欢

» 本主题相关价值贴推荐,对您同样有帮助:

已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

zpzgraduate

铁杆木虫 (著名写手)

自己顶一下,请高人解答
2楼2013-07-01 05:49:22
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
相关版块跳转 我要订阅楼主 zpzgraduate 的主题更新
最具人气热帖推荐 [查看全部] 作者 回/看 最后发表
[考研] 333求调剂 +5 87639 2026-03-21 5/250 2026-03-21 17:54 by JourneyLucky
[考研] 268求调剂 +9 简单点0 2026-03-17 9/450 2026-03-21 15:37 by lature00
[考研] 265求调剂 +12 梁梁校校 2026-03-19 14/700 2026-03-21 13:38 by lature00
[考研] 265求调剂 +9 梁梁校校 2026-03-17 9/450 2026-03-21 02:17 by JourneyLucky
[考研] 296求调剂 +6 www_q 2026-03-18 10/500 2026-03-20 23:56 by JourneyLucky
[考研] 274求调剂 +10 S.H1 2026-03-18 10/500 2026-03-20 23:51 by JourneyLucky
[考研] 321求调剂 +9 何润采123 2026-03-18 11/550 2026-03-20 23:19 by JourneyLucky
[考研] 323求调剂 +3 洼小桶 2026-03-18 3/150 2026-03-20 22:54 by JourneyLucky
[考研] 287求调剂 +7 晨昏线与星海 2026-03-19 8/400 2026-03-20 22:19 by JourneyLucky
[考研] 本人考085602 化学工程 专硕 +19 不知道叫什么! 2026-03-15 21/1050 2026-03-20 20:48 by zhukairuo
[考研] 260求调剂 +3 朱芷琳 2026-03-20 3/150 2026-03-20 20:35 by 学员8dgXkO
[考研] 0703化学调剂 ,六级已过,有科研经历 +13 曦熙兮 2026-03-15 13/650 2026-03-20 19:35 by Dream007008
[考研] 求调剂 +3 暗涌afhb 2026-03-16 3/150 2026-03-20 00:28 by 河南大学校友
[考博] 申博26年 +3 八6八68 2026-03-19 3/150 2026-03-19 19:43 by nxgogo
[考研] 311求调剂 +11 冬十三 2026-03-15 12/600 2026-03-18 14:36 by 星空星月
[考研] 312求调剂 +8 陌宸希 2026-03-16 9/450 2026-03-18 12:39 by Linda Hu
[考研] 0703化学调剂 +3 妮妮ninicgb 2026-03-17 3/150 2026-03-18 10:29 by macy2011
[考研] 277调剂 +5 自由煎饼果子 2026-03-16 6/300 2026-03-17 19:26 by 李leezz
[考研] 301求调剂 +4 A_JiXing 2026-03-16 4/200 2026-03-17 17:32 by ruiyingmiao
[考研] 326求调剂 +3 mlpqaz03 2026-03-15 3/150 2026-03-16 07:33 by Iveryant
信息提示
请填处理意见