This preview shows page 1-2 out of 5 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 5 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 5 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 5 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

2008/08/271Matlab TutorialBased on Matlab tutorial by IPLab@SUTMotivation: powerful and easy! Matlab: a high-performance software and a programming language Powerful Mathematics and visualization Toolboxes in statistics, signal processing, vision… Widely used in AI-related fields Easy Prototyping, testing, debugging, finding helps…Motivation: the 80/20 rule “Remember the 80/20 rule. Hence 80% of your code should be in some high level language like Matlab… Your time is more valuable than the computer's time.”- Prof. Kevin P. MurphyOutline Environment Matrices Elementary math Data types String Cell arrays Multidimensional arrays Programming part next week! Plot, flow control, functions, debug, …2008/08/2722008/08/2732008/08/274Text strings Create a string str = ‘hello world’ disp: display any variable x = [1 2; 3 4]; disp(x); str = ‘hello world’; disp(str); fprintf: print to stdout or files fprintf(‘str=%s, one-third=%4.2f’, 1/3); Type “help fprintf” for file output sprintf: string output as CStrings are character matrices Strings are matrices in which elements are ASCII numbers x = ‘hello’; x(2)e x = ['ab‘ 'cd']abcd x = ['ab' ; 'cd']ab cd  “char” creates a padded character arrays s = char('rolling','stone','momentum.') [rolling ][stone ][momentum] String arrays of different length: cell array (later)2008/08/275More to come next week! Any


View Full Document

CMU CS 15381 - Lecture

Documents in this Course
Planning

Planning

19 pages

Planning

Planning

19 pages

Lecture

Lecture

42 pages

Lecture

Lecture

27 pages

Lecture

Lecture

19 pages

FOL

FOL

41 pages

lecture

lecture

34 pages

Exam

Exam

7 pages

Lecture

Lecture

22 pages

Handout

Handout

11 pages

Midterm

Midterm

14 pages

lecture

lecture

83 pages

Handouts

Handouts

38 pages

mdp

mdp

37 pages

HW2

HW2

7 pages

nn

nn

25 pages

lecture

lecture

13 pages

Handout

Handout

5 pages

Lecture

Lecture

27 pages

Lecture

Lecture

62 pages

Load more
Download Lecture
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Lecture and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Lecture 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?