声振论坛

 找回密码
 我要加入

QQ登录

只需一步,快速开始

查看: 1268|回复: 6

[混合编程] 救助关于matlab小程序的设计,请各位给出,本人将感激不尽!!!

[复制链接]
发表于 2008-12-8 18:32 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?我要加入

x
现在我选修了一门计算物理,教授让我们先编几个小程序,我不会,想向给位请教,希望大家给出程序,我立即验证,我很感谢大家可以帮助我,在这里先谢谢要回答我问题的人,谢谢!!
1.用matlab编写“荡漾的水波”(有二维的三维的等等多种水波,希望大家尽量多的给出)
2.肉块在蒸笼内的温度分布。
就这两个程序,希望大家可以告诉我!!

[ 本帖最后由 sigma665 于 2008-12-9 20:09 编辑 ]

评分

1

查看全部评分

回复
分享到:

使用道具 举报

发表于 2008-12-8 21:14 | 显示全部楼层

回复 楼主 zyx4377158 的帖子

这个有点儿太专业吧?
另外,请LZ注意错别字!
发表于 2008-12-9 08:56 | 显示全部楼层
你应该把 荡漾的水波 用数学表示出来 这样大家才能用matlab告诉你
发表于 2008-12-9 09:32 | 显示全部楼层

回复 楼主 zyx4377158 的帖子

貌似是两个偏微分方程求解的问题,doc pdetool看看吧
 楼主| 发表于 2008-12-9 19:31 | 显示全部楼层
function pdemodel
[pde_fig,ax]=pdeinit;
pdetool('appl_cb',1);
set(ax,'DataAspectRatio',[1 6.5 1]);
set(ax,'PlotBoxAspectRatio',[15 10 1]);
set(ax,'XLim',[-15 15]);
set(ax,'YLim',[-10 120]);
set(ax,'XTickMode','auto');
set(ax,'YTickMode','auto');

% Geometry description:
pderect([0 1 100 0],'R1');
set(findobj(get(pde_fig,'Children'),'Tag','PDEEval'),'String','R1')

% Boundary conditions:
pdetool('changemode',0)
pdesetbd(4,'neu',1,'0','0')
pdesetbd(3,'dir',1,'1','0')
pdesetbd(2,'neu',1,'0','0')
pdesetbd(1,'dir',1,'1','100')

% Mesh generation:
setuprop(pde_fig,'Hgrad',1.3);
setuprop(pde_fig,'refinemethod','regular');
pdetool('initmesh')
pdetool('refine')
pdetool('refine')
pdetool('refine')
pdetool('refine')

% PDE coefficients:
pdeseteq(1,'1.0','0.0','0','1.0','0:10','0.0','0.0','[0 100]')
setuprop(pde_fig,'currparam',['1.0';'0.0';'0 ';'1.0'])

% Solve parameters:
setuprop(pde_fig,'solveparam',...
str2mat('0','18432','10','pdeadworst',...
'0.5','longest','0','1E-4','','fixed','Inf'))

% Plotflags and user data strings:
setuprop(pde_fig,'plotflags',[1 1 1 1 1 1 1 1 0 0 0 1 1 1 0 0 0 1]);
setuprop(pde_fig,'colstring','');
setuprop(pde_fig,'arrowstring','');
setuprop(pde_fig,'deformstring','');
setuprop(pde_fig,'heightstring','');

% Solve PDE:
pdetool('solve')
这个程序我感觉不像是肉块在蒸笼内的温度分布的程序,希望大家为我看看是吗?还有什么问题,应该改进一下!!!
发表于 2008-12-9 22:58 | 显示全部楼层

回复 5楼 zyx4377158 的帖子

是。
btw:楼主最好还是能自己学习一下,难道你选那个计算物理就单单是为了学分?
发表于 2008-12-9 23:01 | 显示全部楼层
专业的数学算法有么?
您需要登录后才可以回帖 登录 | 我要加入

本版积分规则

QQ|小黑屋|Archiver|手机版|联系我们|声振论坛

GMT+8, 2024-5-11 23:11 , Processed in 0.094621 second(s), 21 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表