help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

reading files


From: Nuncio M
Subject: reading files
Date: Wed, 29 Jul 2009 12:35:18 +0530

Dear all,
           I am trying to read some files and made this code

        ext='.txt';
        prefix='file_';
        for i=1:2
        l=i;
        mid=int2str(l);
        filename=([prefix,mid,ext]);
        disp(filename);
        endfor
                untill this point the code worked as expected. I loaded the 'filename'
using the load command. Problem starts when i assign variable to
different columns in file. For example: x=filename(:,1)
this gives a value "f" for  x which is the first character of filename,
file_1.txt.  I understand the problem this way.  Octave treats the
filename as a matrix and assign the first column 'f' to variable x or
may not be.  I am new to octave and I cannot figure out a way to
overcome this. Any help in this regard would be greatly appreciated

regards
nuncio



--
Nuncio.M
Research Scientist
National Center for Antarctic and Ocean research
Head land Sada
Vasco da Gamma
Goa-403804

reply via email to

[Prev in Thread] Current Thread [Next in Thread]