Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Open a Text File with tab Delimited

Subject: Open a Text File with tab Delimited

From: smith Og

Date: 10 Sep, 2010 15:32:07

Message: 1 of 2

I have a text file that is Tab delimited. Howver, when I open it all the words are joined together.

fid = fopen('myfile.txt', 'rt') %I have also tried the default 'r'
line1 = fgetl(fid).
fclose(fid)

All the words are joined together with no space at all.

Subject: Open a Text File with tab Delimited

From: Sean

Date: 10 Sep, 2010 15:38:08

Message: 2 of 2

"smith Og" <adeog@ymail.com> wrote in message <i6dj1n$dg3$1@fred.mathworks.com>...
> I have a text file that is Tab delimited. Howver, when I open it all the words are joined together.
>
> fid = fopen('myfile.txt', 'rt') %I have also tried the default 'r'
> line1 = fgetl(fid).
> fclose(fid)
>
> All the words are joined together with no space at all.

try:
>>help textscan

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us