1 / 32

CSC115: Matlab Special Session

CSC115: Matlab Special Session. Dr. Zhen Jiang Computer Science Department West Chester University. Class information . Textbook Hanselman & Littlefield, “Mastering Matlab 7”, Prentice Hall, Upper Saddle River, NJ, 2005. Example on Page 6 Variable Keyword (reserved word) ;

bairn
Download Presentation

CSC115: Matlab Special Session

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CSC115: Matlab Special Session Dr. Zhen Jiang Computer Science Department West Chester University

  2. Class information • Textbook • Hanselman & Littlefield, “Mastering Matlab 7”, Prentice Hall, Upper Saddle River, NJ, 2005.

  3. Example on Page 6 • Variable • Keyword (reserved word) • ; • Calculation • % (comment) • , • error

  4. <File> <new> • Or the direct access from the icon “blank”

  5. Input / Output • Parameter input • Page 33

  6. Xls input (the easiest one) • Sample xls input file • Page 250 • Also available at http://www.mathworks.com/access/helpdesk/help/techdoc/ref/xlsread.html

  7. Something must know • Page 39 • How to use the readout n?

  8. Apply an operation on every unit in the array • Page 47 • ` (especially useful to handle different input format, see the discussion later)

  9. Standard arrays, page 54 • Ones, zeros, size, eye, rand, randn, diag • Repmat(pi, 3, 4)

  10. Array sorting, search, page 73

  11. Find(a>4, 2, ‘first’) • Page 189, such as a filter to discard NaN or InF • Max • Min • Size

  12. Manipulation * , page 82 (optional)

  13. Multidimensional array • 1-d => 2-d => 3-d, page 98 • 3-d => 2-d => 1-d, page 99 • Reshape(page 57), cat(page 101), flipdim, shiftdim, permute • Their search and sorting, such as a 3d array sorted in one dimension.

  14. [p, q] • [ p q ] • Or cat (2, p, q) • [p; q] • Or cat (1, p, q)

  15. Output • Standard output • Disp(), page 162 • Sprintf, page 168 • Plot, page 276

  16. Other inputs • Sample plain text file • Help fileformats, page 253 • Tip: Try to avoid using low level file I/O

More Related