MATLAB TUTORIAL - PART VIII

Polynomials in MATLAB are defined according to there coefficients, for example:
f (x) = 5x^4 + 10x^2 + 2x + 7 is defined as :
A=[5 0 10 2 7];
Notice the “0” is added to account 0x^3
To compute the roots of A, type:
>> roots(A)
ans =
0.3323 + 1.1880i
0.3323 - 1.1880i
-0.3323 + 0.8997i
-0.3323 - 0.8997i
To evaluate A at x=3 [...]

MATLAB TUTORIAL - PART VII

Element-by-element operations are applied on each element of the array. As we saw earlier, addition and subtraction are already E-B-E. However, multiplication, division and exponentiation are not E-B-E but by adding the dot ‘.’ before the operator, it will behave as E-B-E. Of course in this case, matrices should be of the same size.
E-B-E operations [...]

MATLAB TUTORIAL - PART VI

Addition and subtraction are element by element operations. To use them, the two or more arrays or vectors that should be summed together of subtracted from each other should be having the same number of rows as well as columns.
On the other hand, multiplication is not an element by element operation, so the multiplication of [...]

MATLAB TUTORIAL - PART V

In this part of the tutorial, we will cover how to add or remove elements from already defined variable.
Given a vetor of length n, assigning an element to this vector at position n+3, will add the element at that location and fill n+1 and n+2 with zeros. below is a small example showing what I [...]

MATLAB TUTORIAL - PART IV

Since we will be dealing with matrices a lot, it is always good to learn some matrix and vector operations. And one of the mostly used operations is the transpose operation, where if applied to a vector, it will switch row(column) to column(row), and when it is applied to a matrix, it will switch rows(columns) [...]

MATLAB TUTORIAL - PART III

As we have mentioned earlier, Arrays are fundamental forms used to in MATLAB to store and manipulate data.
It is a list of numbers arranged in rows and/or columns. And of course, the simplest array, is a one dimensional array which is know as a Vector.
And a vector can be of 2 forms, either a row [...]

MATLAB TUTORIAL - PART II

The default display format is the ’short’ where we have 4 decimal digits after the fixed point. We can always change the format by typing the format command, and for more info about parameters to use, type ‘help format’ in the command window.
Below you can find the commands that can be used, with their description [...]

MATLAB TUTORIAL - PART I

MATLAB is a powerful language for technical computing.
MATLAB means MATrix LABoratory, since the basic element in MATLAB is a matrix.
It is a very helpful mathematical tool used in all engineering computations, modelling and simulation, data analysis and processing, visualization and graphics, as well as algorithm development.
As you may know, MATLAB is huge so it is [...]

MATLAB TUTORIAL

From Basics to advanced levels.
Weekly MATLAB tutorials will be posted starting May 28!