matlab beginning - people.cs.nctu.edu.twpeople.cs.nctu.edu.tw/~cmliu/courses/sisy/lab1.pdf ·...
TRANSCRIPT
3
校園授權版軟體
Website – ca.nctu.edu.tw
FTP software – FileZilla
Virtual CD – Daemon tools
4
校園授權版軟體
• FTP帳號與密碼• 站台位址設定• 位址(Host Name):ca.nctu.edu.tw
• 連接埠(Port):21
• 通訊協定:FTP
• 帳號密碼設定– 使用者名稱(username):u+學號例如:學號 9123456,則使用者名稱為u9123456
– 密碼(password):D2 信箱密碼
5
校園授權FTP – Matlab
FTP software – FileZilla
6
虛擬光碟讀取
Virtual CD – Daemon tools
9
Installation
選擇 network.lic存放路徑
NCTU校園網路授權 – 校內網路認證 or 校外使用VPN認證
10
Matlab 基本指令
• 變數: 第一字元必須為英文字母> t=0:0.001:1;
> n=0:30;
> w0=2*pi;
> x1=sin(w0*t);
> w1=pi/10;
> x2=exp(-j*w1*n); i, j代表虛數
12
Matlab 基本指令
• 函數
> y = abs(x); %取絕對值
> z = 1+2j; %複數
> y = angle(z); %相位角
> y = real(z); %取實部
> y = imag(z); %取虛部
13
Matlab 基本指令
• 矩陣
> a = ones(10, 1); %產生10x1的矩陣, 元素1
> b = zeros(10, 1); %產生5x1的矩陣, 元素0
> c = [a, b]; %c為10x2的矩陣
> d = [a; b]; %d為20x1的矩陣
14
Matlab 基本指令
• 常用指令
> clear x %清除變數x
> clear all %清除所有變數
> help sort %查詢sort的function說明
> who %查詢目前使用變數
> whos %查詢目前使用變數型態