MATLAB beginning - National Chiao Tung Universitycmliu/Courses/sisy/Lab1.pdf · 1 MATLAB beginning...

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

Transcript of MATLAB beginning - National Chiao Tung Universitycmliu/Courses/sisy/Lab1.pdf · 1 MATLAB beginning...

  • 1

    MATLAB beginning

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

    Office: 電資大樓704室校內分機: 59268複述課程: 4IJK

    mailto:[email protected]

  • 2

    Outline

    • How to get MATLAB from NCTU

    • Basic MATLAB for Signal&System

  • 3

    校園授權版軟體

    Website – ca.nctu.edu.tw

    FTP software – FileZilla

    Virtual CD – Daemon tools

    ca.nctu.edu.twhttps://www.ohloh.net/projects/filezilla/download?filename=FileZilla_3.3.2_win32.ziphttp://www.disk-tools.com/request?p=c62ef839ae3e9225d4a34e7d511b0b01/DTLite4355-0068.exe

  • 4

    校園授權版軟體

    • FTP帳號與密碼• 站台位址設定• 位址(Host Name):ca.nctu.edu.tw • 連接埠(Port):21 • 通訊協定:FTP

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

  • 5

    校園授權FTP – Matlab

    FTP software – FileZilla

    https://www.ohloh.net/projects/filezilla/download?filename=FileZilla_3.3.2_win32.zip

  • 6

    虛擬光碟讀取

    Virtual CD – Daemon tools

    http://www.disk-tools.com/request?p=c62ef839ae3e9225d4a34e7d511b0b01/DTLite4355-0068.exe

  • 7

    Installation

  • 8

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

  • 9

    Installation

    選擇 network.lic存放路徑

    NCTU校園網路授權 – 校內網路認證 or 校外使用VPN認證

    http://web2.cc.nctu.edu.tw/network/vpn/sslvpn-faq.htmlhttp://web2.cc.nctu.edu.tw/network/vpn/sslvpn-faq.html

  • 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