For Programmers: Free Programming Magazines  


Home > Archive > Matlab > March 2006 > Re: automation of loading multiple data file and f









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: automation of loading multiple data file and f
Jérôme

2006-03-31, 7:06 pm

Hi,

pname=uigetdir;
d=dir(fullfile(pname,'*.txt'));

figure
hold on

for n=1:length(d)

[t,a,b]=textread(d(n).name,'%f %f %f','headerlines',29);
st=3;
plot(t(1:st:end),a(1:st:end),'r+');
plot(t(1:st:end),b(1:st:end),'b.');

m=mean([a b],2);

plot(t(1:st:end),m(1:st:end),'g-');

end

title(pname);

Jérôme
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com