Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: the mathematic relationship between two series of data
Date: Sun, 13 Jul 2008 06:21:02 +0000 (UTC)
Organization: Battelle Energy Alliance (INL)
Lines: 58
Message-ID: <g5c6se$rhd$1@fred.mathworks.com>
References: <g5c16i$l8c$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1215930062 28205 172.30.248.35 (13 Jul 2008 06:21:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sun, 13 Jul 2008 06:21:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 688530
Xref: news.mathworks.com comp.soft-sys.matlab:479024




> 
> A                      B
> 0.0772               99.92%  
> 0.104191429          99.61%
> 0.131182857          98.99% 
> 0.158174286          98.37%
> 0.185165714          97.37%
> 0.212157143          96.36%
> 0.239148571          95.20%
> 0.26614              93.65%
> 0.293131429          92.34% 
> 0.320122857          90.63%
> 0.347114286          88.85%
> 0.374105714          87.00%
> 0.401097143          85.91% 
> 0.428088571          84.29%
> 0.45508              82.35%
> 0.482071429          81.11%
> 0.509062857          76.55%
> 0.536054286          72.37%
> 0.563045714          68.34%
> 0.590037143          65.87%
> 0.617028571          62.15%
> 0.64402              59.44%
> 0.671011429          57.28%
> 0.698002857          54.26%
> 0.724994286          51.01%
> 0.751985714          49.30%
> 0.778977143          46.36%
> 0.805968571          44.43%
> 0.83296              42.96%
> 0.859951429          40.40%
> 0.886942857          39.01%
> 0.913934286          36.84%
> 0.940925714          34.06%
> 0.967917143          33.05%
> 0.994908571          30.96%
> 
> if A is the independent vairable and B is the dependent 
> variable, how to find out their mathematic relationships in 
> Matlab? I have tried in EXCEL but it is not simple linear, 


Certainly an 11th order polynomial fits the data quite well,
but a piecewise quadratic isn't bad either:

P1 = polyfit(A(1:15),B(1:15),2);
X1 = A(1):.001:A(15);
Y1 = polyval(P1,X1);
P2 = polyfit(A(16:end),B(16:end),2);
X2 = A(16):.001:A(end);
Y2 = polyval(P2,X2);
plot(A,B,X1,Y1,X2,Y2)


I guess it depends on what you expect, and what you want out
of the data.