From: Maria_tab Manioudaki on
I want to read a file that includes a number followed by tab and then a string
using the
[A, B] = textread([file, '.mots'], '%d\t%s\n');

and I get this error:

Trouble reading literal string from file (row 1, field 3)

Error in ==> textread at 177
> [varargout{1:nlhs}]=dataread('file',varargin{:});


Any suggestions?

What is (row 1, field 3) refer to??
Thanks,
Maria
From: us on
"Maria_tab Manioudaki" <Belladonna_98(a)hotmail.com> wrote in message <hnt8t1$q5m$1(a)fred.mathworks.com>...
> I want to read a file that includes a number followed by tab and then a string
> using the
> [A, B] = textread([file, '.mots'], '%d\t%s\n');
>
> and I get this error:
>
> Trouble reading literal string from file (row 1, field 3)
>
> Error in ==> textread at 177
> > [varargout{1:nlhs}]=dataread('file',varargin{:});
>
>
> Any suggestions?
>
> What is (row 1, field 3) refer to??
> Thanks,
> Maria

can you show a snippet of one of your input files(?)...

us
From: Maria_tab Manioudaki on
"us " <us(a)neurol.unizh.ch> wrote in message <hnt96c$1qc$1(a)fred.mathworks.com>...
> "Maria_tab Manioudaki" <Belladonna_98(a)hotmail.com> wrote in message <hnt8t1$q5m$1(a)fred.mathworks.com>...
> > I want to read a file that includes a number followed by tab and then a string
> > using the
> > [A, B] = textread([file, '.mots'], '%d\t%s\n');
> >
> > and I get this error:
> >
> > Trouble reading literal string from file (row 1, field 3)
> >
> > Error in ==> textread at 177
> > > [varargout{1:nlhs}]=dataread('file',varargin{:});
> >
> >
> > Any suggestions?
> >
> > What is (row 1, field 3) refer to??
> > Thanks,
> > Maria
>
> can you show a snippet of one of your input files(?)...
>
> us

My input file has the form:
3462 nk
12 kilpoh
1678 THNKIKLO
..
..
..
..
From: us on
"Maria_tab Manioudaki" <Belladonna_98(a)hotmail.com> wrote in message <hnt8uu$r1s$1(a)fred.mathworks.com>...
> I want to read a file that includes a number followed by tab and then a string
> using the
> [A, B] = textread([file, '.mots'], '%d\t%s\n');
>
> and I get this error:
>
> Trouble reading literal string from file (row 1, field 3)
>
> Error in ==> textread at 177
> > [varargout{1:nlhs}]=dataread('file',varargin{:});
>
>
> Any suggestions?
>
> What is (row 1, field 3) refer to??
> Thanks,
> Maria

can you show a snippet of one of your input files(?)...

us
From: us on
"Maria_tab Manioudaki" <Belladonna_98(a)hotmail.com> wrote in message <hnt9jh$8p8$1(a)fred.mathworks.com>...
> "us " <us(a)neurol.unizh.ch> wrote in message <hnt96c$1qc$1(a)fred.mathworks.com>...
> > "Maria_tab Manioudaki" <Belladonna_98(a)hotmail.com> wrote in message <hnt8t1$q5m$1(a)fred.mathworks.com>...
> > > I want to read a file that includes a number followed by tab and then a string
> > > using the
> > > [A, B] = textread([file, '.mots'], '%d\t%s\n');
> > >
> > > and I get this error:
> > >
> > > Trouble reading literal string from file (row 1, field 3)
> > >
> > > Error in ==> textread at 177
> > > > [varargout{1:nlhs}]=dataread('file',varargin{:});
> > >
> > >
> > > Any suggestions?
> > >
> > > What is (row 1, field 3) refer to??
> > > Thanks,
> > > Maria
> >
> > can you show a snippet of one of your input files(?)...
> >
> > us
>
> My input file has the form:
> 3462 nk
> 12 kilpoh
> 1678 THNKIKLO

a hint:
- use this syntax...

[A, B] = textread([file, '.mots'], '%d\t%s');

us