Prev: textread
Next: ??? Error using ==> fzero at 334 Function value at starting guess must be finite and real.
From: us on 18 Mar 2010 11:07 "Maria_tab Manioudaki" > There were tabs in the file > only it seems that recognize any whitespace as such without > dealing with its nature. > > I did not confirm that with hex dump, but I made the file with a previous command > using /t. NO - there were NO TABs in your file... and for your future in this NG: better take your time to check your stuff before you waste time of CSSMers, eg, take the time to perform a hex dump as suggested by dpb... us
From: dpb on 18 Mar 2010 12:54
Maria_tab Manioudaki wrote: > dpb <none(a)non.net> wrote in message > <hntcpi$586$1(a)news.eternal-september.org>... >> Maria_tab Manioudaki wrote: >> > "Maria_tab Manioudaki" <Belladonna_98(a)hotmail.com> wrote in message >> > <hntaul$2p3$1(a)fred.mathworks.com>... >> >> "us " <us(a)neurol.unizh.ch> wrote in message >> >> <hnta6o$j6f$1(a)fred.mathworks.com>... >> >> ... >> >> >> > - use this syntax... >> >> > > [A, B] = textread([file, '.mots'], '%d\t%s'); >> >> > > us >> >> >> >> it won't work... :( >> >> The file is actually a matrix >> >> number/tstring/n >> >> number/tstring/n >> >> number/tstring/n >> >> number/tstring/n >> > > Well... it worked with [A, B] = textread([file, '.mots'], '%d%s'); >> ... >> >> Well....then there _weren't_ any tabs after all most likely...did you >> confirm that w/ a hex dump or other method? >> >> -- > > There were tabs in the file > only it seems that recognize any whitespace as such without dealing with > its nature. > > I did not confirm that with hex dump, but I made the file with a > previous command using /t. If you really used "/t" (forward slash) I don't think that put a tab character in the file (at least w/ my release of ML it doesn't) the escape sequence would be "\t". >> fprintf('%d/t%s', 43,'string') 43/tstring >> fprintf('%d\t%s', 43,'string') 43 string I don't think there's an OS on which ML runs that it would think the '/t' was anything but a character string to embed; I could be shown wrong... -- |