Signals & Systems Introduction To MATLAB: Bo-Yuan Peng E.E. Dept., National Taiwan University
Signals & Systems Introduction To MATLAB: Bo-Yuan Peng E.E. Dept., National Taiwan University
Signals & Systems Introduction To MATLAB: Bo-Yuan Peng E.E. Dept., National Taiwan University
Outline
What is MATLAB? Where to use MATLAB? How to use MATLAB? Homework 1
What is MATLAB?
MATLAB is an interactive environment in which you can write programs to do many powerful calculation.
Number calculation Matrix calculation Plots and/or sketches of mathematical graphs Symbolic calculation Differential Equations Blablabla
MATLAB is installed in every computer in every computer classroom in CC Building. MATLAB is installed in every computer in EEII107. Also, you can connect to the Soft-Bank provided by Computer Center to access MATLAB remotely, given your IP is 140.112.x.x .
http://softbank.cc.ntu.edu.tw/ Only 6 licenses available. DONT OCCUPY the resource.
Soft-Bank in CC
Soft-Bank in CC
Soft-Bank in CC
Soft-Bank in CC
https://sslvpn.ntu.edu.tw/ You can log-in with your student account provided by CC.
You will have to know the path where MATLAB is installed. In CC, it is installed in C:\Program Files\MATLAB .
All of your programs in MATLAB should be put into C:\Program Files\MATLAB\work in order to use the file.
First test
Simple calculation +, -, *, /, ^, mod() Operators Use help
Variables
No need to declare. Just use it. DO NOT use variable i and j. They are imaginary numbers.
Matrices
Use of squared bracket [ ] * vs. .*; / vs. ./
if elseif else end switch case otherwise end for, while, continue, break
Functions in MATLAB
Youd better to use one m-file with one function. syntax: function y = foo()
Homework 1
Download the .pdf file and the .zip file with m-files inside. Pick m-files from the .zip file. Follow the instructions inside the .pdf file to construct one proper m-file. Do discussion with the results in a .pdf file. Compress the discussion and the m-file into one .zip/.rar file. Upload the compressed file to the website.
You may do discussion in Word 2007 then save it as a .pdf file.