We added eps the machine to r to prevent over ow 4 1

Info iconThis preview shows page 1. Sign up to view the full content.

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

Unformatted text preview: vent over ow. 4 1 0.8 0.6 0.4 0.2 0 -0.2 -0.4 10 5 0 -5 -10 -10 0 -5 5 10 Example 3 Printing and Saving Graphs There are two ways to print your plots. The rst one sends a copy of your graph directly to the default printer in the Thomson Hall lab. The second lets you save your graph in a le so you can use Unix printing commands to direct it to the printer of your choice. Type print in the Matlab environment to send your current plot to the pre-de ned printer. On Math Sciences Matlab , the default printer is a laser printer in Thomson Hall. The print command generates a full page plot. If you want to save graphs in a le, use another printer, change the plot orientation, or use other features of the print command, look at the on-line help text within Matlab . For example, to save your graph in a PostScript le, use the command: print -dps name-of-file Loading Data Files Matlab reads in values from ASCII les using the load command. Once the data le has been read in, you can use any of the Matlab graphing commands. Here are some of the things you need to consider when reading in data. The name of the ASCII data le must have two parts, separated by a period. The command load filename.extension reads the le lename.extension, which can be an ASCII le with a rectangular array of numeric data, arranged in m lines with n values in each line. The result is an m-by-n matrix with the same name as the le with the extension (including the period) stripped. Here are some examples: 5 Y = Sin(X) 1 0.8 0.6 0.4 0.2 0 -0.2 -0.4 -0.6 -0.8 -1 0 Critical point Y 1 2 3 X 4 5 6 7 Example 4 load f.m load y1 load func -ascii creates a Matlab variable named f loads from a le named y1.mat loads from a le named func Title and Labels You can...
View Full Document

This note was uploaded on 03/01/2010 for the course ELECTRONIC 12345 taught by Professor Xyz during the Summer '10 term at Punjab Engineering College.

Ask a homework question - tutors are online