matlab teaching
DESCRIPTION
Matlab Teaching. Chia -Chi Chan ( 詹佳琦 ) Visual Communications Laboratory Department of Communications Engineering National Central University. Matlab 介面. 矩陣存取的地方. workspace. Command window. 下指令的地方. 之前的記錄. Command history. Outline. 數學運算 畫圖指令 參考網址. 數學運算. 加總 : sum() 平均值 :mean() - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: Matlab Teaching](https://reader034.vdocuments.pub/reader034/viewer/2022050721/568148b8550346895db5d05f/html5/thumbnails/1.jpg)
MATLAB TEACHING
Chia-Chi Chan (詹佳琦 )
Visual Communications Laboratory
Department of Communications Engineering
National Central University
![Page 2: Matlab Teaching](https://reader034.vdocuments.pub/reader034/viewer/2022050721/568148b8550346895db5d05f/html5/thumbnails/2.jpg)
2
MATLAB 介面
之前的記錄
workspace
矩陣存取的地方
Command window
下指令的地方
Command history
![Page 3: Matlab Teaching](https://reader034.vdocuments.pub/reader034/viewer/2022050721/568148b8550346895db5d05f/html5/thumbnails/3.jpg)
3
OUTLINE
數學運算 畫圖指令 參考網址
![Page 4: Matlab Teaching](https://reader034.vdocuments.pub/reader034/viewer/2022050721/568148b8550346895db5d05f/html5/thumbnails/4.jpg)
4
數學運算 加總 : sum() 平均值 :mean() 排序 : sort()EX:A[4]: 5,2,1,8 作排序 , 加總 , 平均值 排序 :1,2,5,8 加總 :16 平均值 :4
![Page 5: Matlab Teaching](https://reader034.vdocuments.pub/reader034/viewer/2022050721/568148b8550346895db5d05f/html5/thumbnails/5.jpg)
5
IN MATLAB
有加分號就不會顯示出每個值
作總和
作平均值
作排序
![Page 6: Matlab Teaching](https://reader034.vdocuments.pub/reader034/viewer/2022050721/568148b8550346895db5d05f/html5/thumbnails/6.jpg)
6
其他數學運算gcd(x,y) 整數 x 和 y 的最大公因數 lcm(x,y) 整數 x 和 y 的最小公倍數 exp(x) 自然指數
log(x) 以 e 為底的對數,即自然對數ln(x)
log2(x) 以 2 為底的對數 log10(x) 以 10 為底的對數
參考網址 : http://www.cs.nthu.edu.tw/~jang/mlbook/ch1/
![Page 7: Matlab Teaching](https://reader034.vdocuments.pub/reader034/viewer/2022050721/568148b8550346895db5d05f/html5/thumbnails/7.jpg)
7
OUTLINE
數學運算 畫圖指令 參考網址
![Page 8: Matlab Teaching](https://reader034.vdocuments.pub/reader034/viewer/2022050721/568148b8550346895db5d05f/html5/thumbnails/8.jpg)
8
清空檔案 使用 clear 指令會將上次紀錄清空 (workspace)
Workspace 清空
使用 clear 指令
![Page 9: Matlab Teaching](https://reader034.vdocuments.pub/reader034/viewer/2022050721/568148b8550346895db5d05f/html5/thumbnails/9.jpg)
9
畫數據圖 If use Excel….
x 軸 0 2 4 6 8
y 軸 10 18 20 23 28
0 2 4 6 80
5
10
15
20
25
30
數據
數據
![Page 10: Matlab Teaching](https://reader034.vdocuments.pub/reader034/viewer/2022050721/568148b8550346895db5d05f/html5/thumbnails/10.jpg)
10
用 MATLAB 畫圖
使用 plot 指令
![Page 11: Matlab Teaching](https://reader034.vdocuments.pub/reader034/viewer/2022050721/568148b8550346895db5d05f/html5/thumbnails/11.jpg)
11
如果還要再畫圖… 使用 hold on 指令
![Page 12: Matlab Teaching](https://reader034.vdocuments.pub/reader034/viewer/2022050721/568148b8550346895db5d05f/html5/thumbnails/12.jpg)
12
STEP1 如果想更改圖怎麼辦… .
按下去做圖片的更改
![Page 13: Matlab Teaching](https://reader034.vdocuments.pub/reader034/viewer/2022050721/568148b8550346895db5d05f/html5/thumbnails/13.jpg)
13
接著會開啟視窗
可以由此作圖片的更改 :x 軸的間距 ,x 軸的名稱 , 曲線的顏色等等…
顯示兩條線的標籤
![Page 14: Matlab Teaching](https://reader034.vdocuments.pub/reader034/viewer/2022050721/568148b8550346895db5d05f/html5/thumbnails/14.jpg)
14
STEP2 將視窗變回原來的大小
按下去就會變回原來的大小
![Page 15: Matlab Teaching](https://reader034.vdocuments.pub/reader034/viewer/2022050721/568148b8550346895db5d05f/html5/thumbnails/15.jpg)
15
複製圖片
![Page 16: Matlab Teaching](https://reader034.vdocuments.pub/reader034/viewer/2022050721/568148b8550346895db5d05f/html5/thumbnails/16.jpg)
16
貼上的結果
-1 0 1 2 3 4 5 6 7 8 9 10
10
15
20
25
30
35
40
45
50
55
數 據 一數 據 二
![Page 17: Matlab Teaching](https://reader034.vdocuments.pub/reader034/viewer/2022050721/568148b8550346895db5d05f/html5/thumbnails/17.jpg)
17
將數據的每個點標示出來
![Page 18: Matlab Teaching](https://reader034.vdocuments.pub/reader034/viewer/2022050721/568148b8550346895db5d05f/html5/thumbnails/18.jpg)
18
開檔案寫指令
開新檔
![Page 19: Matlab Teaching](https://reader034.vdocuments.pub/reader034/viewer/2022050721/568148b8550346895db5d05f/html5/thumbnails/19.jpg)
19
執行 (RUN)
![Page 20: Matlab Teaching](https://reader034.vdocuments.pub/reader034/viewer/2022050721/568148b8550346895db5d05f/html5/thumbnails/20.jpg)
20
更多指令請參考… .
![Page 21: Matlab Teaching](https://reader034.vdocuments.pub/reader034/viewer/2022050721/568148b8550346895db5d05f/html5/thumbnails/21.jpg)
21
參考網站 MATLAB 程式設計與應用 (網路版 ) 張智星
http://www.cs.nthu.edu.tw/~jang/mlbook/
MATLAB程式設計《入門篇》:投影片 http://neural.cs.nthu.edu.tw/jang/books/ma
tlabProgramming4beginner/cdrom/matlabProgramming4beginner/slide/