15
1 MATLAB beginning 霹靂博助教: 張家齊 email: [email protected] Office: 電資大樓704校內分機: 59268 複述課程: 4IJK

MATLAB beginning - people.cs.nctu.edu.twpeople.cs.nctu.edu.tw/~cmliu/Courses/sisy/Lab1.pdf · email: [email protected] Office: ... Microsoft Windows XP Key Swap Tools ICROSOFT

  • Upload
    doanh

  • View
    215

  • Download
    0

Embed Size (px)

Citation preview

1

MATLAB beginning

霹靂博助教: 張家齊email: [email protected]

Office: 電資大樓704室校內分機: 59268

複述課程: 4IJK

2

Outline

• How to get MATLAB from NCTU

• Basic MATLAB for Signal&System

4

校園授權版軟體

• FTP帳號與密碼• 站台位址設定• 位址(Host Name):ca.nctu.edu.tw

• 連接埠(Port):21

• 通訊協定:FTP

• 帳號密碼設定– 使用者名稱(username):u+學號例如:學號 9123456,則使用者名稱為u9123456

– 密碼(password):D2 信箱密碼

5

校園授權FTP – Matlab

FTP software – FileZilla

7

Installation

8

InstallationNCTU校園授權碼 - 27791-62375-35552-29358

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代表虛數

11

Matlab 基本指令

• 繪圖

> plot(t, x1);

> stem(n, x2);

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 %查詢目前使用變數型態

15

Thanks for your listening