Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: reading text and ints from a file
Replies: 1   Last Post: Jun 20, 1996 10:27 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Daniel Teitelbaum

Posts: 6
Registered: 12/7/04
reading text and ints from a file
Posted: Jun 19, 1996 2:08 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

I've got a matlab question. This may be asked frequently. If so, I
apologize. Anyway, I have data that look like this


332700424 90905 336370986 A
332700424 90906 306356986 A
332700424 90912 326111986 B+
332700424 90940 311370986 A-
332700424 90915 311370986 B
332700424 90907 323555986 A-

They represent: instructor, course number, student, grade.

What I want to do is convert the grades into floating points (A = 4.0,
A- = 3.6667, etc.) and read the data into a 6 column by 4 row matrix.

I can't manage to get fscanf to handle it. Could someone please send me
a code segment that can read these data? I'd be more than happy to read
the data element by element in a loop, but I can't figure out how to do
that either.

Thanks in advance,

Dan





Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.