wlxydgq 发表于 2010-3-2 11:39

多元函数拟合的软件和程序

:@Q ,我现在需要拟合一个五元函数。我用的是1stopt 1.5版的,尚不说拟合好坏,关键是拟合的速度太慢,需要好多天。
大家都是用什么软件拟合多元函数的参数呢,哪一个速度会快点呢?希望大家推荐一二,如果方便的话,给一个现成的程序,我将不胜感激。
注:我用过maple和Fortran,这两个软件可以做到吗?怎么写程序呢?

adawin 发表于 2010-3-3 17:33

您好,1stopt这么慢啊,我还真想买呢,能和您交流下吗,我也用matlab,也许能帮到你

dingd 发表于 2010-3-3 21:48

原帖由 wlxydgq 于 2010-3-2 11:39 发表 http://www.chinavib.com/forum/images/common/back.gif
:@Q ,我现在需要拟合一个五元函数。我用的是1stopt 1.5版的,尚不说拟合好坏,关键是拟合的速度太慢,需要好多天。
大家都是用什么软件拟合多元函数的参数呢,哪一个速度会快点呢?希望大家推荐一二,如果方便的话 ...

最好把问题贴上来才好发现哪儿有问题!

adawin 发表于 2010-3-4 19:30

主任,我的问题算写清楚了么,麻烦解答下啦,谢谢

wlxydgq 发表于 2010-3-5 11:35

计算程序没有问题,只是运算速度慢。
就是想找一个运算快点的方法。

wlxydgq 发表于 2010-3-5 11:41

回复 板凳 dingd 的帖子

程序如下:
Title "Type your title here";
Parameters p51,p52,p53,p54,p55,p56,p57,p58,p59,p510,p511,p61,p62,p63,p64,p65,p66,p67,p68,p69,p610,p611,p71,p72,p73,p74,p75,p76,p77,p78,p79,p710,p711;
Constant R=83.1451,Tc=647.096,p50=-10097698.7020424,p60=242005341.091914,p70=-1926309306.61686;
Variable V,pLG,VG,VL,T,y;
Function   y=R*T*(1/V-(1/10)*((10*(p70+p71*(Tc/T-1)+p72*(Tc^2/T^2-1)+p73*(Tc^3/T^3-1)+p74*(Tc^4/T^4-1)+p75*(Tc^5/T^5-1)+p76*(Tc^6/T^6-1)+p77*(Tc^7/T^7-1)))*R*T*VG^6+
60*ln(pLG*VL/(R*T))*R*T*VL^6*VG^6-60*ln(pLG*VG/(R*T))*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5-1)+p76*(Tc^6/T^6-1)+p77*(Tc^7/T^7-1))/V^7);
Data;
V,pLG,VG,VL,T,y=
45421047.33        0.006116548        3710987.122        18.01900658        273.16        0.0005
22709507.93        0.006116548        3710987.122        18.01900658        273.16        0.001
15138991.54        0.006116548        3710987.122        18.01900658        273.16        0.0015
11353729.76        0.006116548        3710987.122        18.01900658        273.16        0.002
9082568.923        0.006116548        3710987.122        18.01900658        273.16        0.0025
7568457.791        0.006116548        3710987.122        18.01900658        273.16        0.003
6486945.84        0.006116548        3710987.122        18.01900658        273.16        0.0035
5675807.806        0.006116548        3710987.122        18.01900658        273.16        0.004
5044918.542        0.006116548        3710987.122        18.01900658        273.16        0.0045
4540202.959        0.006116548        3710987.122        18.01900658        273.16        0.005
4127249.636        0.006116548        3710987.122        18.01900658        273.16        0.0055
3783117.628        0.006116548        3710987.122        18.01900658        273.16        0.006
。。。。。。。。。。。。。。。。。。。

wlxydgq 发表于 2010-3-5 11:42

参数有6列,1000多行,就不意义列举了
页: [1]
查看完整版本: 多元函数拟合的软件和程序