声振论坛

 找回密码
 我要加入

QQ登录

只需一步,快速开始

查看: 1099|回复: 4

求助,初学者。编程中几个要解决的问题

[复制链接]
发表于 2006-3-23 15:33 | 显示全部楼层 |阅读模式

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

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

x
clear;<BR>x0=input('input the original inner pressure:');%定义包装内某种气体的分压的初始值<BR>x=x0;<BR>t=input('input t:');<BR>h=input('input h:');<BR>p=input('input the pressure of out:');<BR>Pm=input('input the gas permeative coefficient:');<BR>E=input('input the percent of the hole:');<BR>A=input('input the total area of the film:');<BR>D=input('input the diameter of the hole:');<BR>L=input('input the length of the hole:');<BR>T=input('input the temperature:');<BR>V=input('input the free volume of package:');<BR>M=input('input the molecular weight of the gas:');<BR>R=input('input the gas constant:');<BR>b=Pm*(1-E)*A+D*E*A*sqrt(8*R*T/(pi*M));<BR>c=b*V/(R*T*L);<BR>for i=1:h:n<BR>    x=x+(p-x)*c*h;<BR>   plot(i,x,'bp');<BR>    hold on<BR>end<BR>disp(x);<BR>刚学,有好多问题都不知道怎么解决。主要有两个问题:<BR>1,怎么用简单的方法来输入数据?想直接输入一列或者一行的相关数据,是否可以实现<BR>2,由于我算出来的是点,所以得出的图也是离散的点,是不是有什么命令可以让这些离散点拟合成一条曲线。还有把初始点在包括在其中<BR>希望大家能多给我该程序的意见和解决的方案。多谢了
回复
分享到:

使用道具 举报

 楼主| 发表于 2006-3-23 20:29 | 显示全部楼层
<P>哎,是不是编得实在太不像话了。都没有人愿意帮忙。<BR>555555555555555555555</P>
 楼主| 发表于 2006-3-23 20:31 | 显示全部楼层
<P>happy大侠还在吗?帮我看看。诚求。</P>
发表于 2006-3-24 07:51 | 显示全部楼层

回复:(hhyyq)求助,初学者。编程中几个要解决的问题...

<DIV class=quote>1,怎么用简单的方法来输入数据?想直接输入一列或者一行的相关数据,是否可以实现<BR>2,由于我算出来的是点,所以得出的图也是离散的点,是不是有什么命令可以让这些离散点拟合成一条曲线。还有把初始点在包括在其中<BR>希望大家能多给我该程序的意见和解决的方案。多谢了</DIV>
<P><BR>1.比如你的第一个参数,再输入的时候<BR>input the original inner pressure:[1 2 3]<BR>那么这时你给x0赋的值就是向量[1 2 3]<BR><BR>2.polyfit就是拟合函数,具体怎么用看帮助</P>
 楼主| 发表于 2006-3-24 08:59 | 显示全部楼层
<P>谢谢大侠了!辛苦了</P>
您需要登录后才可以回帖 登录 | 我要加入

本版积分规则

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

GMT+8, 2024-5-15 18:38 , Processed in 0.066473 second(s), 17 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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