| 查看: 460 | 回复: 8 | |||
| 当前主题已经存档。 | |||
| 当前只显示满足指定条件的回帖,点击这里查看本话题的所有回帖 | |||
monitor2885至尊木虫 (职业作家)
队长
|
[交流]
【求助】help里面的例子怎么运行不了
|
||
|
function pdex1 m = 0; x = linspace(0,1,20); t = linspace(0,2,5); sol = pdepe(m,@pdex1pde,@pdex1ic,@pdex1bc,x,t); % Extract the first solution component as u. u = sol(:,:,1); % A surface plot is often a good way to study a solution. surf(x,t,u) title('Numerical solution computed with 20 mesh points.') xlabel('Distance x') ylabel('Time t') % A solution profile can also be illuminating. figure plot(x,u(end, )title('Solution at t = 2') xlabel('Distance x') ylabel('u(x,2)') % -------------------------------------------------------------- function [c,f,s] = pdex1pde(x,t,u,DuDx) c = pi^2; f = DuDx; s = 0; % -------------------------------------------------------------- function u0 = pdex1ic(x) u0 = sin(pi*x); % -------------------------------------------------------------- function [pl,ql,pr,qr] = pdex1bc(xl,ul,xr,ur,t) pl = ul; ql = 0; pr = pi * exp(-t); qr = 1; 在help里面调出pdepe,这是里面的第一例子。为什么第一个surf图正常,第二个平面图出错呢?大家帮忙试试 ??? Error using ==> plot Too many input arguments. Error in ==> pdex1 at 19 plot(x,u(end, )[ Last edited by monitor2885 on 2009-9-23 at 16:24 ] |
» 猜你喜欢
全日制(定向)博士
已经有5人回复
假如你的研究生提出不合理要求
已经有10人回复
萌生出自己或许不适合搞科研的想法,现在跑or等等看?
已经有4人回复
Materials Today Chemistry审稿周期
已经有4人回复
参与限项
已经有3人回复
实验室接单子
已经有4人回复
对氯苯硼酸纯化
已经有3人回复
求助:我三月中下旬出站,青基依托单位怎么办?
已经有12人回复
所感
已经有4人回复
要不要辞职读博?
已经有7人回复

9楼2009-10-02 12:46:22
change0618
铁杆木虫 (著名写手)
方丈大师
- 应助: 44 (小学生)
- 金币: 17724.5
- 红花: 17
- 帖子: 2413
- 在线: 546.7小时
- 虫号: 496517
- 注册: 2008-01-19
- 专业: 化学反应工程
2楼2009-09-24 09:07:50
monitor2885
至尊木虫 (职业作家)
队长
- 应助: 6 (幼儿园)
- 贵宾: 0.339
- 金币: 38700.5
- 散金: 147
- 红花: 22
- 帖子: 4943
- 在线: 2166.8小时
- 虫号: 701577
- 注册: 2009-02-15
- 性别: GG
- 专业: 生态系统生态学

4楼2009-09-24 21:30:45
nono2009
超级版主 (文学泰斗)
No gains, no pains.
-

专家经验: +21105 - 仿真EPI: 1
- 应助: 28684 (院士)
- 贵宾: 513.911
- 金币: 2555220
- 散金: 27828
- 红花: 2147
- 沙发: 66666
- 帖子: 1602255
- 在线: 65200.9小时
- 虫号: 827383
- 注册: 2009-08-13
- 性别: GG
- 专业: 工程热物理与能源利用
- 管辖: 科研家筹备委员会
5楼2009-09-25 06:40:10












)
回复此楼