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

Info icon This 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

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern