Presentation is loading. Please wait.

Presentation is loading. Please wait.

Introduction to Matlab By Nazarudin,S.Si,M.Si,PhD.

Similar presentations


Presentation on theme: "Introduction to Matlab By Nazarudin,S.Si,M.Si,PhD."— Presentation transcript:

1 Introduction to Matlab By Nazarudin,S.Si,M.Si,PhD

2 What is Matlab MATLAB is an integrated technical computing environment that combines numeric computation, advanced graphics and visualization, and a high level programming language (www.mathworks.com/products/matlab)

3 Using Matlab you can use it to: graph functions solve equations, perform statistical tests and do much more.

4 It is a high-level programming language, so : You can communicate with its cousins, e.g., FORTRAN and C. You can produce sound and animate graphics. You can do simulations and modeling (especially if you have access not just to basic MATLAB but also to its accessory SIMULINK). You can prepare materials for export to the World Wide Web. In addition, you can use MATLAB, in conjunction with th e word processing and desktop publishing features of Microsoft Word, to combine mathematical computations with text and graphics to produce a polished, integrated, and interactive document.

5 A program this sophisticated contains many features and options. There are literally hundreds of useful commands at your disposal. The MATLAB help documentation contains thousands of entries. The standard references, whether the MathWorks User’s Guide for the product, or any of our competitors, contain myriad tables describing an endless stream of commands, options, and features that the user might be expected to learn or access. MATLAB is more than a fancy calculator; it is an extremely useful and versatile tool. Even if you only know a little about MATLAB, you can use it to accomplish wonderful things. The hard part, however, is figuring out which of the hundreds of commands, scores of help pages, and thousands of items of documentation you need to look at to start using it quickly and effectively. That’s where we come in

6 A sophisticated program The program contains many features and options. There are literally hundreds of useful commands at your disposal. MATLAB is more than a fancy calculator; it is an extremely useful and versatile tool. Even if you only know a little about MATLAB, you can use it to accomplish wonderful things. The hard part, however, is figuring out which of the hundreds of commands, scores of help pages, and thousands of items of documentation you need to look at to start using it quickly and effectively.

7 Getting Started You start MATLAB as you would any other software application. On a PC you access it via the Start menu, in Programs under a folder such as MatlabR12

8 A Matlab desktop

9 Matlab Basics you can use MATLAB to do arithmetic as you would a calculator. You can use: “+” to add “-” to subtract “*” to multiply “/” to divide “ˆ” to exponentiate

10 Examples for arithmetic >> 3ˆ2 - (5 + 4)/2 + 6*3 ans = 510.9934 ansˆ2 + sqrt(ans) ans = 510.9934

11 >> u = cos(10) u = -0.8391 >> v = sin(10) v = -0.5440 >> uˆ2 + vˆ2 ans = 1 Examples for arithmetic (continue)

12 Examples for algebra >> syms x y >> (x - y)*(x - y)ˆ2 ans = (x-y)^3 >> expand(ans) ans = x^3-3*x^2*y+3*x*y^2-y^3

13 Examples for algebra (continue) >> factor(ans) ans = (x-y)^3

14 Examples for algebra (continue) MATLAB has a command called simplify, which you can sometimes use to express a formula as simply as possible. For example, >> simplify((xˆ3 - yˆ3)/(x - y)) ans = x^2+x*y+y^2

15 Example for graph

16 3D surface graph

17 Contour graph


Download ppt "Introduction to Matlab By Nazarudin,S.Si,M.Si,PhD."

Similar presentations


Ads by Google