Presentation is loading. Please wait.

Presentation is loading. Please wait.

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

Similar presentations


Presentation on theme: "CSC115: Matlab Special Session Dr. Zhen Jiang Computer Science Department West Chester University."— 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

4 Example on Page 6 ◦ Variable ◦ Keyword (reserved word) ◦ ; ◦ Calculation ◦ % (comment) ◦, ◦ error

5

6 Or the direct access from the icon “blank”

7

8 Input / Output Parameter input Page 33

9

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

11

12

13 Something must know Page 39 ◦ How to use the readout n?

14

15

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

17

18 Standard arrays, page 54 ◦ Ones, zeros, size, eye, rand, randn, diag ◦ Repmat(pi, 3, 4)

19 Array sorting, search, page 73

20

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

22

23

24 Manipulation *, page 82 (optional)

25 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.

26 [p, q] ◦ [ p q ] ◦ Or cat (2, p, q) [p; q] ◦ Or cat (1, p, q)

27 Output ◦ Standard output ◦ Disp(), page 162 ◦ Sprintf, page 168 ◦ Plot, page 276

28

29

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

31

32


Download ppt "CSC115: Matlab Special Session Dr. Zhen Jiang Computer Science Department West Chester University."

Similar presentations


Ads by Google