f



inserting certain text from text file to matlab

i am using a software which outputs me a text file with 1000 lines of
data. I specifically need certain lines (lets say line 100- 150), and
input them into matlab. These lines actually consists of columns
(lets say "X-Axis" "Y-Axis" "Z-Axis"). The first line does include
the title of these columns. I want matlab to read these lines, and
then using a code...generate some graphs for me.

Any help would be appreciated.

Anuj
0
apuri (2)
5/23/2005 4:20:52 PM
comp.soft-sys.matlab 211266 articles. 23 followers. lunamoonmoon (257) is leader. Post Follow

3 Replies
737 Views

Similar Articles

[PageSpeed] 49

Anuj wrote:
> i am using a software which outputs me a text file with 1000 lines of
> data. I specifically need certain lines (lets say line 100- 150), and
> input them into matlab. These lines actually consists of columns
> (lets say "X-Axis" "Y-Axis" "Z-Axis"). The first line does include
> the title of these columns. I want matlab to read these lines, and
> then using a code...generate some graphs for me.
>
> Any help would be appreciated.
>
> Anuj

I would use fgetl to read and count off the lines, and sscanf
to read the fields in each line.

HTH
-rajeev-

0
rrr (83)
5/23/2005 8:02:19 PM
rajeev,

i am kind of a beginner in matlab...can you elaborate a little bit on
the commands you mentioned...how to work with them.

thanks

Anuj

Rajeev wrote:
>
>
>
> Anuj wrote:
>> i am using a software which outputs me a text file with 1000
> lines of
>> data. I specifically need certain lines (lets say line 100-
150),
> and
>> input them into matlab. These lines actually consists of
columns
>> (lets say "X-Axis" "Y-Axis" "Z-Axis"). The first line does
> include
>> the title of these columns. I want matlab to read these lines,
> and
>> then using a code...generate some graphs for me.
>>
>> Any help would be appreciated.
>>
>> Anuj
>
> I would use fgetl to read and count off the lines, and sscanf
> to read the fields in each line.
>
> HTH
> -rajeev-
>
>
0
apuri (2)
5/23/2005 8:37:08 PM
anuj wrote:
 
> i am kind of a beginner in matlab...
HI,

it seems that you should start here :

 <http://www.mathworks.com/access/helpdesk/help/techdoc/learn_matlab/learn_matlab.html>

And more specific to your problem :

 <http://www.mathworks.com/access/helpdesk/help/techdoc/matlab_prog/ch10_inp.html>

Read "Importing/Exporting Text Data" section.

Try for a while with these informations
Good luck
J�r�me
0
dutmatlab (3797)
5/24/2005 7:06:25 AM
Reply: