• Complain

César Pérez López - MATLAB Matrix Algebra

Here you can read online César Pérez López - MATLAB Matrix Algebra full text of the book (entire story) in english for free. Download pdf and epub, get meaning, cover and reviews about this ebook. 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.

César Pérez López MATLAB Matrix Algebra

MATLAB Matrix Algebra: summary, description and annotation

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

MATLAB is a high-level language and environment for numerical computation, visualization, and programming. Using MATLAB, you can analyze data, develop algorithms, and create models and applications. The language, tools, and built-in math functions enable you to explore multiple approaches and reach a solution faster than with spreadsheets or traditional programming languages, such as C/C++ or Java.

MATLAB Matrix Algebra introduces you to the MATLAB language with practical hands-on instructions and results, allowing you to quickly achieve your goals. Starting with a look at symbolic and numeric variables, with an emphasis on vector and matrix variables, you will go on to examine functions and operations that support vectors and matrices as arguments, including those based on analytic parent functions. Computational methods for finding eigenvalues and eigenvectors of matrices are detailed, leading to various matrix decompositions. Applications such as change of bases, the classification of quadratic forms and how to solve systems of linear equations are described, with numerous examples. A section is dedicated to sparse matrices and other types of special matrices. In addition to its treatment of matrices, you will also learn how MATLAB can be used to work with arrays, lists, tables, sequences and sets.

What youll learn

How to use MATLAB to work with numeric and symbolic variables, including vector and matrix variables.

How MATLAB supports functions with vectors and matrices as arguments.

Applications such as change of bases, classification of quadratic forms and solutions of systems of linear equations.

How to find various matrix decompositions using MATLAB.

How to work with sparse matrices and other special matrices.

How to manipulate arrays, lists, tables, sequences and sets.

How to use MATLAB to work with matrix algebra over the complex field.

Who this book is for

This book is for anyone who wants to work on matrix algebra problems in a practical, hands-on manner using MATLAB. Youll already have a core understanding of undergraduate level linear algebra, and have access to an installed version of MATLAB, but no previous experience of MATLAB is assumed.

César Pérez López: author's other books


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

MATLAB Matrix Algebra — 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 "MATLAB Matrix Algebra" 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
Csar Prez Lpez 2014
Csar Prez Lpez MATLAB Matrix Algebra 10.1007/978-1-4842-0307-1_1
1. Matrix and Vector Variables (Numeric and Symbolic)
Csar Prez Lpez 1
(1)
Madrid, Spain
1.1 Variables
The concept of variable, like the concept of function, is essential when working with mathematical software. Obviously, the theoretical concept of a mathematical variable is fixed and independent of the software package, but how to implement and manage variables is very characteristic of each particular program. MATLAB allows you to define and manage variables, and store them in files, in a very simple way.
When extensive calculations are performed, it is convenient to give names to intermediate results. Each intermediate result is assigned to a variable to make it easier to use. For example, we can define the variable x and assign the value to it in the following way:
>> x = 5
x =
From now on, whenever the variable x appears it will be replaced by the value , and it will not change its value until it is redefined.
>> x ^ 2
ans =
The variable x will not change until we explicitly assign another value to it.
>> x = 7 + 4
x =
From this moment on, the variable x will take the value .
It is very important to stress that the value assigned to a variable will remain fixed until it is expressly changed or if the current MATLAB session is closed. It is common to forget the definitions given to variables during a MATLAB session, causing misleading errors when the variables are used later in the session. For this reason, it is convenient to be able to remove the assignment of a value to a variable. This operation is performed by using the command clear . It is also useful to recall the variables we have defined in the present session, which is done using the command who :
  • The expression x = value assigns the value value to the variable x .
  • The command clear removes the value assigned to all variables.
  • The command clear x removes the value assigned to the variable x.
  • The command clear x y removes the value assigned to the variables x and y.
  • The command who gives the names of all variables currently in memory (variables in the workspace).
  • The command whos gives the names, sizes, number of items, bytes occupied, and type of all variables currently in memory.
Here are some examples that use the variable handling commands defined above:
>> x = 7, y = 4 + i, z = sqrt (3)
x =
y =
4.0000 + 1.0000i
z =
1.7321
>> p=x+y+z
p =
12.7321 + 1.0000i
>> who
Your variables are:
ans p x y z
>> whos
Name Size Elements Bytes Density Complex
ANS 1 by 1 1 8 Full No
p 1 by 1 1 16 Full Yes
x 1 by 1 1 8 Full No
y 1 by 1 1 16 Full Yes
z 1 by 1 1 8 Full No
Grand total is 5 elements using 56 bytes
Now we are going to change the value of the variable y , and delete the variable x .
>> y = pi
y =
3.1416
>> clear x;
>> whos
Name Size Elements Bytes Density Complex
ANS 1 by 1 1 8 Full No
p 1 by 1 1 16 Full Yes
y 1 by 1 1 8 Full No
z 1 by 1 1 8 Full No
Grand total is 4 elements using 40 bytes
We see that the variable x has disappeared and that the variable y has the new value assigned, but the variable p has not changed, despite having changed two of its components. For an expression that contains a variable whose value has been changed, to update its value it is necessary to rerun it:
>> p=y+z
p =
4.8736
>> whos
Name Size Elements Bytes Density Complex
ANS 1 by 1 1 8 Full No
p 1 by 1 1 8 Full No
y 1 by 1 1 8 Full No
z 1 by 1 1 8 Full No
Grand total is 4 elements using 32 bytes
Now all values are updated, including that of p .
As for the names that can be given to the variables, the only restriction is that they cannot start with a number or contain punctuation characters that are assigned a special meaning in MATLAB. It is also advisable to name variables with words that begin with lowercase letters, and in general with words completely in lowercase. This avoids collisions with MATLAB functions beginning with an uppercase letter. MATLAB is case sensitive. There can be any number of characters in the name of a variable, but MATLAB will handle only the first 19.
1.2 Variables and Special Constants
In many kinds of calculations we need to work with variables and special constants that the program has enabled. Here are some examples:
  • PI or maple (PI): 3.1415926535897
  • i or j or maple(i): imaginary unit (square root of - 1).
  • inf or maple(infinity) : Infinity, returned for example when presented with 1/0.
  • NaN ( Not a Number ): Indeterminate, returned for example when presented with 0/0.
  • realmin: the smallest usable positive real number.
  • realmax: the greatest usable positive real number.
  • finite(x): returns 1 if x is finite and zero otherwise.
  • isinf(x): returns 1 if x is infinity or - infinity, and zero otherwise.
  • isNaN(x): returns 1 if x is undetermined and zero otherwise.
  • isfinite(x): returns 1 if x is finite and zero otherwise.
  • ana: automatically creates a variable to represent the last unmapped processing result which has not been assigned to a variable.
  • eps: returns the distance from 1.0 to the next largest double-precision number. This is the default tolerance for floating-point operations (floating point relative accuracy). In current IEEE machines its value is 2 ^(-52).
  • isieee: returns 1 if the machine is IEEE and 0 otherwise.
  • computer: returns the type of the computer.
  • flops: returns the number of floating point operations that have been executed in a session (flops(0) resets the operations counter).
  • version: returns the current version of MATLAB.
  • why: returns a concise message.
  • cputime: returns CPU time in seconds used by MATLAB since the beginning of the session.
  • clock: returns a list consisting of the following 6 items: [year month day hour minutes seconds].
  • date: returns the current calendar date.
  • etime: returns the time elapsed between two clock type lists (defined above).
  • tic: enables a temporary counter in seconds that ends with the use of the variable toc.
  • toc: returns the elapsed time in seconds since the variable tic was activated.
  • LastErr: returns the last error message.
  • See: gives information about the program and its Toolbox.
  • Info: provides information about MATLAB.
  • subscribe to: gives information about the subscription to MATLAB.
  • whatsnew: provides information about new undocumented MATLAB features.
Here are some examples:
First we check if our computer is an IEEE machine, what type of computer it is, and find the current date and time:
>> isieee
ans =
>> computer
Next page
Light

Font size:

Reset

Interval:

Bookmark:

Make

Similar books «MATLAB Matrix Algebra»

Look at similar books to MATLAB Matrix Algebra. 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 «MATLAB Matrix Algebra»

Discussion, reviews of the book MATLAB Matrix Algebra 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.