Ch5_8 - Next Previous Click to edit Master subtitle style...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Next Previous Click to edit Master subtitle style Section 5.8: Reading From Formatted Files Section 5.8: Reading From Formatted Files 11 Skipping text when using the load function Using fscanf Section 5.8: Reading From Formatted Files Next Previous Section 5.8: Reading From Formatted Files Section 5.8: Reading From Formatted Files 22 The command load filename.txt, loads an entire file into a matrix variable called filename To skip text in a file, start the line with a % sign % is a comment command, the equivalent of // in C++ One limitation for data files is that all the data rows must have the same number of columns Note: separate numbers with blanks, not commas Here, we use an example file called points.txt : A file listing numbered map points, each with an x and y location Here, we will use this file to illustrate loading a file with text Later, we use this file again with a MATLAB program map.m....
View Full Document

This note was uploaded on 05/19/2008 for the course ENGR 25 taught by Professor All during the Spring '08 term at Lehigh University .

Page1 / 9

Ch5_8 - Next Previous Click to edit Master subtitle style...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online