Matlab - min, sum, prod same rule as max 4. MORE ADVANCED...

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

View Full Document Right Arrow Icon
Course Assistant: Hongsong Yuan Email: [email protected] Office Hours: Tuesdays 5:30-7pm room 540-108
Background image of page 1

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

View Full DocumentRight Arrow Icon
Topics 1. HOW TO USE HELP 1. BASIC VARIABLE DEFINITION AND ARITHMETICS 1. 1. MORE ADVANCED MATRIX OPERATIONS
Background image of page 2
Topics 1. CONTROL STRUCTURES 1. WRITING .m FILES 1. GENERATING RANDOM NUMBERS 1. PLOTTING GRAPHS
Background image of page 3

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

View Full DocumentRight Arrow Icon
2. BASIC VARIABLE DEFINITION AND ARITHMETICS + addition - subtraction * multiplication / division \ left division ^(caret) power exp() power of the natural basis log() natural logarithm abs() absolute value sqrt() square root sin(), cos(), tan(), cot() trigonometric functions min(,) max(,) minimum, maximum of two numbers
Background image of page 4
definition use [ ] ‘(apostrophe) transpose + - component-wise .* ./ component-wise * matrix multiplication / A/B=A*(B inverse) .^ component-wise power log, sqrt, sin component-wise max for vectors, the maximum of all components for matrices, maximum of each column
Background image of page 5

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

View Full DocumentRight Arrow Icon
Background image of page 6
Background image of page 7

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

View Full DocumentRight Arrow Icon
Background image of page 8
Background image of page 9

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

View Full DocumentRight Arrow Icon
Background image of page 10
Background image of page 11
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: min, sum, prod same rule as max 4. MORE ADVANCED MATRIX OPERATIONS • rank rank of a matrix • ^ matrix power • inv inverse matrix • norm matrix norm • eig eigenvalues, eigenvectors • jordan Jordan form • svd singular value decomposition • chol Cholesky factorization 5. CONTROL STRUCTURES • if • for • while 6. WRITING .m FILES general forms: • function name (arguments) • function variable = name (arguments) • function [variable1, variable2] = name (arguments) 7. GENERATING RANDOM NUMBERS • rand uniform [0,1] • randn normal(0,1) • link to the pdf, cdf in HELP 8. PLOTTING GRAPHS • plot • fplot • ezplot • plot3 • ezplot3 • meshgrid, mesh Simulating a Markov chain • Flipping a biased coin • number of heads seen by time t = 4 . y probabilit with (Tails) 6 . y probabilit with (Heads) 1 t Z t t Z Z Z N + + + = 2 1 t N...
View Full Document

This note was uploaded on 02/03/2011 for the course MS&E 221 taught by Professor Ramesh during the Winter '11 term at Stanford.

Page1 / 11

Matlab - min, sum, prod same rule as max 4. MORE ADVANCED...

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

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