Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Combining series of matrices
Replies: 10   Last Post: Jan 26, 2013 10:05 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Ehsan

Posts: 9
Registered: 12/7/12
Re: Combining series of matrices
Posted: Jan 20, 2013 12:30 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

"james bejon" wrote in message <kdh908$g0c$1@newscl01ah.mathworks.com>...
> If you supply some code that generates the relevant data structure, I'll happily have a go...


ind=1;
while date<=end_date
filename=sprintf('SS%s.csv',datestr(date,'yymmdd'));
if exist(filename,'file')
%display('OK!')
data{ind,1}=importdata(filename,',',9);
m=size(data{ind,1}.data(:,2));
time=zeros(m(1,1),1);
for n=1:m(1,1)
time(n,1)=datenum(data{ind,1}.textdata(n+9,2),'HH:MM:ss');
end
time=date+time-735235;
data{ind,1}.data=[datevec(time),data{ind,1}.data];
r=size(data{ind,1}.data(:,2));
for i=1:2:r
Luminance{ind,1}.data(ceil(0.5*i),:)=data{ind,1}.data(i,:);
Radiance{ind,1}.data(ceil(0.5*i),:)=data{ind,1}.data(i+1,:);
end
index1=find(Luminance{ind,1}.data(:,1)==0);
Luminance{ind,1}.data(index1,:)=[];
index2=find(Radiance{ind,1}.data(:,1)==0);
Radiance{ind,1}.data(index2,:)=[];
else
str=['Warning file ',datestr(date),' does not exist'];
display(str)
end
date=date+1;
ind=ind+1;
end



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.