0% found this document useful (0 votes)
54 views

Matlab Tutorial: Motivation: Powerful and Easy!

Matlab is a powerful and easy-to-use high-performance software and programming language. It has powerful tools for mathematics, visualization, statistics, signal processing, and computer vision. It is widely used in artificial intelligence fields. Matlab also makes prototyping, testing, debugging, and finding help easy. The tutorial will cover the Matlab environment, matrices, elementary math operations, data types like strings and cell arrays, and programming concepts like plotting and flow control. More advanced topics like functions and debugging will be covered next week.

Uploaded by

MD Svfi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
54 views

Matlab Tutorial: Motivation: Powerful and Easy!

Matlab is a powerful and easy-to-use high-performance software and programming language. It has powerful tools for mathematics, visualization, statistics, signal processing, and computer vision. It is widely used in artificial intelligence fields. Matlab also makes prototyping, testing, debugging, and finding help easy. The tutorial will cover the Matlab environment, matrices, elementary math operations, data types like strings and cell arrays, and programming concepts like plotting and flow control. More advanced topics like functions and debugging will be covered next week.

Uploaded by

MD Svfi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

2008/08/27

Motivation: powerful and easy!


Matlab Tutorial  Matlab: a high-performance software and a
programming language
 Powerful
 Mathematics and visualization
Based on Matlab tutorial by  Toolboxes in statistics, signal processing,
IPLab@SUT vision…
 Widely used in AI-related fields
 Easy
 Prototyping, testing, debugging, finding helps…

Motivation: the 80/20 rule Outline


 Environment
 “Remember the 80/20 rule. Hence  Matrices
80% of your code should be in some  Elementary math
high level language like Matlab… Your  Data types
time is more valuable than the  String
computer's time.”  Cell arrays
- Prof. Kevin P. Murphy  Multidimensional arrays
 Programming part next week!
 Plot, flow control, functions, debug, …

1
2008/08/27

2
2008/08/27

3
2008/08/27

Text strings Strings are character matrices


 Create a string  Strings are matrices in which elements are ASCII
numbers
 str = ‘hello world’  x = ‘hello’; x(2)
e
 disp: display any variable  x = ['ab‘ 'cd']
abcd
 x = [1 2; 3 4]; disp(x);  x = ['ab' ; 'cd']
 str = ‘hello world’; disp(str); ab
cd
 fprintf: print to stdout or files  “char” creates a padded character arrays
 fprintf(‘str=%s, one-third=%4.2f’, 1/3);  s = char('rolling','stone','momentum.')
[rolling ]
 Type “help fprintf” for file output [stone ]
[momentum]
 sprintf: string output as C  String arrays of different length: cell array (later)

4
2008/08/27

More to come next week!

 Any question?

You might also like