Skip to content

Instantly share code, notes, and snippets.

Created April 11, 2013 12:37
Show Gist options
  • Save anonymous/5363054 to your computer and use it in GitHub Desktop.
Save anonymous/5363054 to your computer and use it in GitHub Desktop.
clc
clear all;
%terereret
xxx=dir('*.txt');
for j=1:length(xxx)
y=xxx(j,1).name;
a=dlmread(y);
pjg=length(a);
b=zeros(pjg*2+1,1);
b(1,1)=pjg;
x=1;
for i=1:pjg
b(x+1,1)=a(i,1);
b(x+2,1)=a(i,2);
x=x+2;
end
pjgt=length(y);
y(pjgt-3:pjgt-4+8)='conv.ind';
dlmwrite(y,b,'newline', 'pc');
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment