Slideshare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our User Agreement and Privacy Policy.

Slideshare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our Privacy Policy and User Agreement for details.

Successfully reported this slideshow.

Like this presentation? Why not share!

- Data Applied: Correlation by DataminingTools Inc 236 views
- All life is yoga by Renu Vashistha 416 views
- 1 yoga for physical stamina by Elsa von Licy 1436 views
- Doing Yoga Daily can Make you Slim ... by Medy Info Solutions 274 views
- Portavocía en redes sociales by Muévete en bici p... 183 views
- R: Apply Functions by DataminingTools Inc 12289 views

1,370 views

Published on

Programming Environment in Matlab

Published in:
Technology

No Downloads

Total views

1,370

On SlideShare

0

From Embeds

0

Number of Embeds

11

Shares

0

Downloads

0

Comments

0

Likes

2

No embeds

No notes for slide

- 1. Matlab: Programming Environment<br />
- 2. Your first run<br />Section 1: The toolbar is where you can access the various features, tools and options regarding your code, debugging process, formatting, etc<br />
- 3. Your first run<br />Section 2: The file-manager shows your current directory and the files in it. You can change the directory by double clicking any folder or using the drop-down menu at the top.<br />
- 4. Your first run<br />Section 3: The command window is the place from where you tell MATLAB what is to be done! You have the option of either writing commands directly or running a 'MATLAB' file (with the extension .m) which would consist of commands, functions or programs. <br />
- 5. Your first run<br />Section 4: When you write a new program or type in some commands, you would almost always, use variables to store the values obtained. The workspace shows you all your current variables and their values and allows you to edit, copy or duplicate them. <br />
- 6. Your first run<br />Section 5: The command history window saves your recent commands and helps you in keeping a track of what you have been up to! <br />It comes out quite handy when you have to use long commands repeatedly: Simply double click on that command in the command history window and it will start running! <br />
- 7. MATLAB Help<br />MATLAB provides an excellent documentation of all its toolboxes and their respective commands. It also includes sample codes and examples! Go to the Help option and MATLAB and click on 'Product Help'(or simply press F1). <br />
- 8. MATLAB Help<br />Explore the Help contents and you would find loads of useful things. Here is a snapshot of the first example in Image Processing toolbox. It teaches how to read and display an image. <br />
- 9. Function Browser: a quick search tool!<br />Click on 'Help' on the toolbar and go to 'Function Browser' (or press Shift+F1). This is what will pop up:<br />
- 10. Function Browser: a quick search tool!<br />The 'Function Browser', as the name suggests, is a quick search tool for description and synopsis of commands and functions of MATLAB. In the figure towards the right, I have searched for 'contrast' and it lists all the functions and commands related to that keyword. It gives concise information about the function you are looking for. <br />
- 11. Basic Functions<br />Matlab allows us to define (and evaluate) our own functions as well. For example, lets define a function f(x)=x2+1. To do this, we simply type in f=x.^2+1. Since x has a value of 10, the answer is 101. We can now change the value of x. For example, type x=5 and enter, then type f=x.^2+1 again. We should now get 26. <br />
- 12. Basic Functions<br />Almost all of Matlab's basic commands revolve around the use of vectors. A vector is defined by placing a sequence of numbers within square braces:<br />>> v = [3 1] <br />v = 3 1 <br />
- 13. Basic Functions<br />To view the vector just type its label:<br />>> v <br /> v = 3 1 <br />>> v = [3 1 7 -21 5 6]<br /> v = 3 1 7 -21 5 6<br />
- 14. Basic Functions<br />To define a matrix, we can treat it like a column of row vectors (note that the spaces are required!):<br />>> A = [ 1 2 3; 3 4 5; 6 7 8] <br />A = 1 2 3 <br /> 3 4 5 <br /> 6 7 8 <br />
- 15. Basic Functions<br /> the whoscommand will let you know all of the variables you have in your work space.<br />>> whos<br /> Name Size Bytes Class<br /> A 3x3 72 double array <br />B 3x3 72 double array<br /> v 1x5 40 double array <br />Grand total is 23 elements using 184 bytes<br />
- 16. Basic Functions<br /> Sometimes you would like to clear all of your data and start over. You do this with the "clear" command. <br />>> clear<br /> >> whos<br />
- 17. Visit more self help tutorials<br />Pick a tutorial of your choice and browse through it at your own pace.<br />The tutorials section is free, self-guiding and will not involve any additional support.<br />Visit us at www.dataminingtools.net<br />

No public clipboards found for this slide

Be the first to comment