Wednesday, June 10, 2009

2nd version of the epa ozone data code

 %This program runs faster than the 1st version
%The data output is in a better form, no cell arrays are involved.
%When the data record is not a number but a string, it converts that record into NaN. In the 1st version, it onverts that into 0.

%This program loads a series of file of ozone data
clear all; close all; clc;
[TXSt TXCo TXSi]=textread('TXSites.txt','%n %n %n','delimiter','|');
[NJSt NJCo NJSi]=textread('NJSites.txt','%n %n %n','delimiter','|');
[LASt LACo LASi]=textread('LASites.txt','%n %n %n','delimiter','|');
FN=textread('filenumber.txt','%s');
TXData=[];NJData=[];LAData=[];%define arrays
for i=1: 161
    i
    [St Co Si Da Le]=textread(FN{i},'%*s %*s %n %n %n %*s %*s %*s %*s %*s %n %*s %s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s','delimiter','|');
    [r c]=size(St);
for j=1:r
   if (ismember(St(j), TXSt))&&(ismember(Co(j), TXCo))&&(ismember(Si(j),TXSi))
       TXData=[TXData; [St(j), Co(j), Si(j), Da(j), str2double(Le(j))*1000]];
   else if (ismember(St(j), NJSt))&&(ismember(Co(j), NJCo))&&(ismember(Si(j),NJSi))
           NJData=[NJData; [St(j), Co(j), Si(j), Da(j), str2double(Le(j))*1000]];
       else if (ismember(St(j), LASt))&&(ismember(Co(j), LACo))&&(ismember(Si(j),LASi))
               LAData=[LAData; [St(j), Co(j), Si(j), Da(j), str2double(Le(j))*1000]];
           end
       end
   end
end
end

No comments:

Post a Comment

Any comments?

my-alpine and docker-compose.yml

 ``` version: '1' services:     man:       build: .       image: my-alpine:latest   ```  Dockerfile: ``` FROM alpine:latest ENV PYTH...