The Matlab language This is a high level

The Matlab language : -. This is a high – level matrix/array language with control flow statements , functions , data structures , input/array , and object – oriented programming features. it allows both "programming in the small " to rapidly creat quick and dirty throw – away programs , and "programming in the larg" to creat large and complex application programs.

Graphics: Matlab has extensive facilities for displaying vectors and matrices as graphs , as well as annotating and printing these graphs. it includes high – level functions for two – dimensional and three – dimensional data visualization , image processing , animation , and presentation graphics. it also includes low – level functions that allow you to fully customize the appearance of graphics as well as to build complete graphical user interfaces on your Matlab applications.

1 Basics of matlab 1 - 1 starting matlab To run matlab on a pc double- click on the matlab icon. you get matlab to do things for you by typing in commands. matlab prompts you with two greater-than signs(>>) when it is ready to accept a command from you. to end a matlab session type quit or exit at the matlab prompt. you can type Help at the matlab prompt , or pull down the help menu on a PC. You can learn how to use any matlab command by typing help followed by the name of the command , for example , help sin. you can also use the Look for command , which searches the help entries for all matlab commands for a particular word. for example , if you want to know which matlab functions to use for spectral analysis, you could type look for spectrum. matlab

responds with the names of the commands that have the searched word in the first line of the help entry. You can search the entire help entry for all matlab commands by typing look for – all keyword. 1 -2 Matrices The basic object that matlab deals with is a matrix. A matrix is an array of numbers. there are types of matrices such as rows and columns and row-vector or column-vector , also any value in mathlab represent in

matrix like for example 65 also called a scalar this is matrix is 1 x 1. 1 -3 Variables in matlab are named objects that are assignes using the equals sign =. the are limited to 31 characters and can contain upper and lowercase letters, any number of '' characters , and numerals. they may not start with a numeral. matlab is case sensitive : A and a are different variables. The following are valid matlab variable assignments: A=1 , speed=1200, beamformatoutput_type 1 = v*q*v , name = 'smith' These are invalid assignments 2 for 1 = 'yes' , first one=1.

The Matlab language : -. This is a high – level matrix/array language with control flow statements , functions , data structures , input/array , and object – oriented programming features. it allows both "programming in the small " to rapidly creat quick and dirty throw – away programs , and "programming in the larg" to creat large and complex application programs.
- Slides: 6