Ch5_12 - Section 5.12: Writing to Files 11 Opening Closing...

Info iconThis preview shows pages 1–5. 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

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: Section 5.12: Writing to Files 11 Opening Closing a file and printing to it a file when finished Section 5.12: Writing to Files Previous Next A file output example: foutexample.m output command name that you choose e.g. we use fileout here text file name to write to If it doesn't exist, MatLab will create it 22 `wt' means write in text (not binary) format printing heading text to the file formats and prints specific variables indicated Printing to a file with fprintf is just like printing to the screen, except you must also include the file output command Must close the file, or program will not print output to file Section 5.12: Writing to Files Previous Next Executing the foutexample.m 33 The output file: created by foutexample.m viewed in Notepad foutexample.m is in the Chapter5 Examples folder Section 5.12: Writing to Files Previous Next 44 End of Slide Show for Section 5.12 MatLab example done in this section foutexample. m This is a good time to work on Exercise 5.12 Section 5.12: Writing to Files Previous Next 55 End of Slide Show for Section 5.12 MatLab example done in this section foutexample. m This is a good time to work on Exercise 5.12 Section 5.12: Writing to Files Previous Next ...
View Full Document

Page1 / 5

Ch5_12 - Section 5.12: Writing to Files 11 Opening Closing...

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

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