uploading a file txt
Chiara
chi.venier at gmail.com
Tue Jul 5 13:46:26 CEST 2011
It doesn't work, but maybe I wrongly write the fprintfMat syntax.
My script is as follows:
fd=mopen('file.txt');
M=mfscanf(-1,fd,"%f %f %f %f %f %f %f\n");
stacksize('max')
gstacksize('max')
mclose(fd);
data=M(:,1);
for i=2:length(data)-1
if M(i,7)~=M(i-1,7);
M(i,8)=%nan;
M(i+1,8)=%nan;
M(i+2,8)=%nan;
M(i+3,8)=%nan;
M(i+4,8)=%nan;
M(i+5,8)=%nan;
M(i+6,8)=%nan;
M(i+7,8)=%nan;
M(i+8,8)=%nan;
M(i+9,8)=%nan;
M(i+10,8)=%nan;
M(i+11,8)=%nan;
M(i+12,8)=%nan;
M(i+13,8)=%nan;
M(i+14,8)=%nan;
end
end
M(1:15,8)=%nan;
Mnew=M;
Mnew(or(isnan(Mnew)'),:) = [];
fprintfMat(TMPDIR + '/Mnew.txt');
Is it possible to save the matrix Mnew in the directory where I am working?
Thanks for help
Chiara
--
View this message in context: http://mailinglists.scilab.org/uploading-a-file-txt-tp3090694p3140486.html
Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com.
More information about the users
mailing list