matlab - CDA6530: Performance Models of Computers and...

Info iconThis preview shows pages 1–7. Sign up to view the full content.

View Full Document Right Arrow Icon
CDA6530: Performance Models of Computers and Networks Chapter 4: Using Matlab for Performance Analysis and Simulation
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2 Objective Learn a useful tool for mathematical analysis and simulation Interpreted language, easy to learn Use it to facilitate our simulation projects A good tool to plot simulation/experiment results figures for academic papers More powerful than excel Could directly create .eps for Latex
Background image of page 2
3 Introduction MatLab : Mat rix Lab oratory Numerical Computations with matrices Every number can be represented as matrix Why Matlab? User Friendly (GUI) Easy to work with Powerful tools for complex mathematics Matlab has extensive demo and tutorials to learn by yourself Use help command
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
4 Matrices in Matlab To enter a matrix 2 5 3 6 4 1 >> A = [2 5 3; 6 4 1] >> B = [1:1.5:6; 2 3 4 5] >> for i=1:4 for j=1:3 C(i,j)=i*j; end end >> D =[]; D=[D;5]; D=[D;6;7] >> E = zeros(4, 5)
Background image of page 4
5 Basic Mathematical Operations Remember that every variable can be a matrix! Addition: >> C = A + B Subtraction: >> D = A – B Multiplication: >> E = A * B (Matrix multiplication) >> E = A .* B (Element wise multiplication, A and B same size) Division: Left Division and Right Division >> F = A . / B (Element wise division) >> F = A / B = A*inv(B) (A * inverse of B) >> F = A . \ B (Element wise division) >> F = A \ B=inv(A)*B (inverse of A * B)
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
6 Matrix with ZEROS: >> A = zeros(m, n)
Background image of page 6
Image of page 7
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 01/14/2012 for the course CDA 6530 taught by Professor Zou during the Fall '11 term at University of Central Florida.

Page1 / 24

matlab - CDA6530: Performance Models of Computers and...

This preview shows document pages 1 - 7. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online