%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
MATLAB applications, tutorials, examples, tricks, resources,...and a little bit of everything I learned ...
Subscribe to:
Post Comments (Atom)
my-alpine and docker-compose.yml
``` version: '1' services: man: build: . image: my-alpine:latest ``` Dockerfile: ``` FROM alpine:latest ENV PYTH...
-
It took me a while to figure out how to insert a space in Mathtype equations. This is especially useful when you write an equation with mult...
-
Recently I read post from Dr. Doug Hull's blog: http://blogs.mathworks.com/videos/2009/10/23/basics-volume-visualization-19-defining-s...
-
To get the slope of a pair of x and y, usually I first plot the curve and then add the trend line. Actually there are two functions i...
No comments:
Post a Comment
Any comments?