• Complain

Abhishek K Gupta - Numerical Methods using MATLAB

Here you can read online Abhishek K Gupta - Numerical Methods using MATLAB full text of the book (entire story) in english for free. Download pdf and epub, get meaning, cover and reviews about this ebook. City: Berkeley;CA;New York, year: 2014, publisher: Apress, genre: Home and family. Description of the work, (preface) as well as reviews are available. Best literature library LitArk.com created for fans of good reading and offers a wide selection of genres:

Romance novel Science fiction Adventure Detective Science History Home and family Prose Art Politics Computer Non-fiction Religion Business Children Humor

Choose a favorite category and find really read worthwhile books. Enjoy immersion in the world of imagination, feel the emotions of the characters or learn something new for yourself, make an fascinating discovery.

Abhishek K Gupta Numerical Methods using MATLAB
  • Book:
    Numerical Methods using MATLAB
  • Author:
  • Publisher:
    Apress
  • Genre:
  • Year:
    2014
  • City:
    Berkeley;CA;New York
  • Rating:
    3 / 5
  • Favourites:
    Add to favourites
  • Your mark:
    • 60
    • 1
    • 2
    • 3
    • 4
    • 5

Numerical Methods using MATLAB: summary, description and annotation

We offer to read an annotation, description, summary or preface (depends on what the author of the book "Numerical Methods using MATLAB" wrote himself). If you haven't found the necessary information about the book — write in the comments, we will try to find it.

Abhishek K Gupta: author's other books


Who wrote Numerical Methods using MATLAB? Find out the surname, the name of the author of the book and a list of all author's works by series.

Numerical Methods using MATLAB — read online for free the complete book (whole text) full work

Below is the text of the book, divided by pages. System saving the place of the last page read, allows you to conveniently read the book "Numerical Methods using MATLAB" online for free, without having to search again every time where you left off. Put a bookmark, and you can go to the page where you finished reading at any time.

Light

Font size:

Reset

Interval:

Bookmark:

Make
Abhishek K Gupta 2014
Abhishek K Gupta Numerical Methods using MATLAB 10.1007/978-1-4842-0154-1_1
1. Introduction to MATLAB
Abhishek K Gupta 1
(1)
Kanpur, India
In this chapter, we will talk about the basics of MATLAB and how to get started with it. We expect the reader to have basic programming skills, and therefore we will not cover any MATLAB programming concepts in detail. When discussing any topic, we will try not to go into such specifics that cause us to deviate from our main goal. Instead, we will provide proper references which can be consulted for more information.
Introduction
MATLAB is a programming language created with the basic goal of providing a simple intuitive platform for engineering design applications. However, as well as being a programming language, it can also be classified as software for computation and visualization. On one hand, you can call sophisticated programming routines in MATLAB, while on the other hand you can just open a simple graphical user interface to fill in the specifications, click OK, and MATLAB will perform computations and visualize it for you.
As we will see in later chapters, most engineering tasks require processing of matrices, for example image processing or data regression. MATLAB provides an excellent platform and routines for matrix operations. In fact, MATLAB is short for MATrix LABoratory because its main feature is to provide direct operations on matrices and to avoid complicated loops.
Current engineering applications use numerical simulations extensively, which require specific functions along with a programming language. For example, a signal processing application will need filter, fft and similar basic functions. In typical programming environments such as C/C++, you need to write these basic functions yourself. MATLAB provides all such basic and advanced functions in built-in packages known as toolboxes. MATLAB currently has a wide range of toolboxes for different engineering fields, e.g. it has toolboxes devoted to signal processing, image processing, communication, control systems and finance. In addition, some engineers are more inclined towards graphical models and want to avoid writing programming routines. MATLAB also features Simulink, which provides a platform for building and simulating graphical models without knowledge of programming.
MATLAB provides an interactive environment to perform engineering tasks for most current fields. You can also use your own toolboxes or use extra toolboxes built by others, which are freely available at the MATLAB File exchange at the following address:
http://http://www.mathworks.com/matlabcentral/fileexchange .
With its intuitive language, minimalistic programming commands, capability of one shot matrix operations, a wide range of toolboxes for most engineering fields, interactive platform and excellent visualization capabilities, MATLAB is regarded as an excellent and preferred tool for academic research and industrial applications.
Interface
After you have successfully installed MATLAB, you can open it by double clicking the icon or typing matlab in the terminal/run window. Depending on your machine, you will see something like Figure . The whole interface is known as the MATLAB Desktop. It consists of many components and windows which can be reorganized and enabled/disabled by mouse actions or via Desktop Layout menu options. Here are some of the important components one can find in a standard MATLAB Desktop:
Figure 1-1 MATLAB Desktop Command Window The command window can be - photo 1
Figure 1-1.
MATLAB Desktop
Command Window
The command window can be considered as a terminal. It is shown at the bottom of the middle column in Figure . Here, you can type your commands and run MATLAB programs (known as scripts). MATLAB displays >> as the command prompt.
Current Directory
The Current Directory in MATLAB represents a directory in which MATLAB looks for the functions and program files. In order to run a program, it must be in the current directory. The Current Directory window shows all the files and folders in the current directory. You can change the current directory or even add some folders to the MATLAB search path.
Workspace
The MATLAB workspace contains all the variables present and is shown at the top right of Figure . MATLAB programming differs from conventional programming languages in the sense that any variables created during a program execution remain, even after the program has executed, until you explicitly clear them or close the MATLAB session.
Figures
MATLAB uses figure windows to display any plot or visualization. This is shown in the leftmost column of Figure . We can open multiple figure windows using the figure command.
Command History
The command history window stores and displays all previous MATLAB commands issued in the command window. You can rerun any command by double clicking on the command window. We can also access the command via the keyboard, using the up and down arrow keys.
Editor
MATLAB provides an integrated editor to write commands and programs and execute them. The editor also can be used to debug programs. It is shown at the top middle of Figure .
Help Browser
MATLAB provides excellent documentation for all its functions with sufficient examples. To open MATLAB help, you can type doc or go to Help Product Help. To directly open help about a function (for example sin), we would type
doc sin;
Getting Started
In our first example, we will create a simple program to multiply two numbers. MATLAB programs are called scripts or also M-files because their extension is .m. To create a script named myfirstprogram.m , let us go to the command window and type
edit myfirstprogram
MATLAB will open an editor window with a blank file name. Type the following code
a=4;
b=3;
c=a*b;
disp(c);
Save this file and run the code by entering the following in the command window
myfirstprogram
When you press enter, you get the following output
c=
Let us spend some time in understanding this simple program. We dont need any sophisticated program definitions or imports to run a simple program such as multiplication in MATLAB. In this program, we have defined two variables a and b. To define/assign a variable, we simply need to type
variablename= variablevalue;
We then multiplied them to store the answer in c and displayed it using the disp command.
The semicolon used to terminate each line is not necessary. If the semicolon is omitted, MATLAB will also display the value computed in the right-hand side of the statement. For example, typing
c=a*b;
will result in the computation of c without displaying the result, while typing
c=a*b
will result in the computation of c and also result in the display of the output in the command window. We can change the value of any variable by reassigning its value. For example
c=7;
will change the value of c to 7.
The first question which comes to our mind concerns the type of a. Is it stored as a double or an integer? First of all, all the variables stored in MATLAB are matrices. Secondly, all the numerical values are treated as double. So 4 is a 11 double numerical matrix. So if we compute the division of a by b using
Next page
Light

Font size:

Reset

Interval:

Bookmark:

Make

Similar books «Numerical Methods using MATLAB»

Look at similar books to Numerical Methods using MATLAB. We have selected literature similar in name and meaning in the hope of providing readers with more options to find new, interesting, not yet read works.


Reviews about «Numerical Methods using MATLAB»

Discussion, reviews of the book Numerical Methods using MATLAB and just readers' own opinions. Leave your comments, write what you think about the work, its meaning or the main characters. Specify what exactly you liked and what you didn't like, and why you think so.