码迷,mamicode.com
首页 > 其他好文 > 详细

The composition, seasonal variation and potential sources of the atmospheric wet sulfur (S) and nitrogen (N) _Method

时间:2015-10-08 10:14:59      阅读:194      评论:0      收藏:0      [点我收藏+]

标签:

Methods

No linear relationship was found between NO2 tropospheric column and NO3-, but both well simulated by y=y0+a*sin(b*x+c)+e*x indicating NO2 tropospheric column could reflect the trend of NO3- but was difficult to quantify NO3-.

data,

 技术分享

(1) User defined function: y=y0+a*sin(b*x+c)+e*x in Sigmaplot

First, generate scatter 

 技术分享技术分享

 

 

Second, define the function  "y=y0+a*sin(b*x+c)+e*x"

技术分享技术分享技术分享技术分享

 

Equation:

pi=3.14159265358979

f = y0+a*sin(2*pi*x/b+c)

fit f to y

‘‘fit f to y with weight reciprocal_y

‘‘fit f to y with weight reciprocal_ysquare

‘‘fit f to y with weight reciprocal_pred

‘‘fit f to y with weight reciprocal_predsqr

 

 Vavriables

x = col(1) ‘ {{prevmin: 0.000000}} {{prevmax: 5.000000}} {{intervals: 100}}

y = col(2)

reciprocal_y = 1/abs(y)

reciprocal_ysquare = 1/y^2

reciprocal_pred = 1/abs(f)

reciprocal_predsqr = 1/f^2

‘Automatic Initial Parameter Estimate Functions

F(q) = sinp(x,y)

Initial parameters:  

a = F(0)[1]  ‘‘Auto {{previous: 95}}

b = if(F(0)[2]<>0, F(0)[2], 1)  ‘‘Auto {{previous: 1.8}}

c = F(0)[3]  ‘‘Auto {{previous: .5}}

y0 = mean(y)  ‘‘Auto {{previous: 5}}

 

Constraits 

a>0

b>0

c>-6.28

c<6.28

 

Third, gernrate the curve

技术分享

 

Additional procedure

Multiple lines:

Linear trend, then, right click, Curve fit, Line/Scatter

技术分享

 

 

(2) Made "y=y0+a*sin(b*x+c)+e*x" in Matlab

 cftool -v1

技术分享技术分享技术分享

技术分享

The composition, seasonal variation and potential sources of the atmospheric wet sulfur (S) and nitrogen (N) _Method

标签:

原文地址:http://www.cnblogs.com/rockman/p/4860092.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!