CS 1371 Lecture Notes - Lecture 3: Matlab, File Descriptor, Delimiter

75 views3 pages

Document Summary

Often, you will want matlab to process data that is represented in a plain text file. In order to do this, you have to open the file in matlab and then go through the lines one by one and extract any data that you think you will need. Just so you know, i/o stands for input/output. There are 3 basic steps to low level file i/o: open the file or files, read or write lines, close the files. In order to process a file using matlab, you have to open it in matlab and give matlab access to the file. To do this, you will use the function fopen(input) where the input is a string with the name of the . txt file. You would apply this as follows: fh = fopen( example. txt"); Fh is a file handle, which is an integer reference value to the file being opened in that statement.

Get access

Grade+
$40 USD/m
Billed monthly
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
10 Verified Answers
Class+
$30 USD/m
Billed monthly
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
7 Verified Answers

Related Documents

Related Questions