Line | |
---|
1 | function rha = rhadj(rh,rhmax)
|
---|
2 | % RHADJ: rescales RH to have a maximum of 100%.
|
---|
3 | % RHADJ(rh,rhmax) rescales RH so that the maximum values do not
|
---|
4 | % exceed 100%. Assumes values between 93% and rhmax should be
|
---|
5 | % rescaled to 93 - 100% (the calibration curves of RH sensors usually
|
---|
6 | % become nonlinear above ~ 90%, and may peak above 100% in this range
|
---|
7 | % above ~ 90% where their calibration becomes unstable.)
|
---|
8 |
|
---|
9 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
---|
10 | % 4/10/98: version 1.0
|
---|
11 | % 8/5/99: version 2.0
|
---|
12 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
---|
13 |
|
---|
14 | rhl=93;
|
---|
15 |
|
---|
16 | rhn=rh;
|
---|
17 | a=(100-rhl)./(rhmax-rhl);
|
---|
18 | drh=rh-rhl;
|
---|
19 | j=find(drh>0);
|
---|
20 | rhn(j)=rhl+a.*drh(j);
|
---|
21 |
|
---|
22 | rha=rhn; |
---|
Note: See
TracBrowser
for help on using the repository browser.