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) to columns(rows). And it is applied when typing ‘ to the variable as shown in the example below:
>> a3
a3 =
1 3 5
1 3 4
23 41 59
>> a3′
ans =
1 1 23
3 3 41
5 4 59
And since the basic elemet of MATLAB is the array, it is good to master the addressing of its elements. You can address individual elements or subgroups in a matrix or vector.
In the case of vectors, all you have to do is to execute vector(k) where k is the position of the element that we want. While in the case of matrices, we have to specify the number of row and the number of column of the element wthat we want. so Matrix(k,p) will give you the element at the intersection between row k and column p. Of course you can change the value at that location by executing:
Vector(k)=newvalue
Matrix(k,p)=new value
Here is an example to address an element in a vector:
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 vector or a column vector.
We should note that Arrays can handle numbers as well as charaters and strings.
A one dimensional array, can be used for example to represent the position of a point in space.
Of course, there are several ways to create a vector depending on the source of information which can be specific numbers or mathematical expressions or a series of elements with constant spacing.
Below are some of the different forms:
If you have a certain number of data like the profit of a company between in years 1988 1989 1990 1991
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 and an example on each case:
format short: fixed point with 4 decimal digits >> 280/6ans =46.6667
format long: fixed point with 14 decimal digits>> 280/6ans =46.666666666666664
format short e: scientific notation with 4 decimal digits>> 280/6ans =4.6667e+001
format long e: scientific notation with 15 decimal digits>> 280/6ans =4.666666666666666e+001
format short g: best of 5-digit fixed or floating point>> 280/6ans =46.667
format long g: best of 15-digit fixed or floating point>> 280/6ans =46.6666666666667
format bank: two decimal digits>> 280/6ans =46.67
format compact: eliminates empty lines to allow more lines with info to be displayed on the screen Read more…
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 impossible to cover all MATLAB at once. So we will focus here on the foundations of MATLAB, and once understood, any topic will be easily understood. And of course, the HELP menu is a very rich source of information in case we are stuck.
In this part of the tutorial, we will describe the different windows in MATLAB, while concentrating on the Command Window. We will also deal with arithmetic operations with scalars. Of course, we will define the scalar variable first and then introduce the elementary math functions that can be applied on scalars.
The default view of MATLAB consists of 3 main windows which are :
Command window
Current directory window
Command history window
And there is the start button in the lower left corner of the screen which is used to access MATLAB tools and features.
The purposes of the windows in addition to the 3 windows mentioned above are listed below:
Command window: main window, enters variables, runs programs
Figure window: contains output from graphic commands
Editor window: creates and debugs script and function files
Help window: provides help information
Launch pad window: provides access to tools, demos and documentations
Command history window: logs commands entered in the command window
Workspace Window: provides information about the variables that are used
Current directory window: shows the files in the current directory Read more…
Can you imagine that something as simple as improper sleep can be one of the causes of elevated blood pressure?
This is a well known fact for adults, but recently a new study suggests that there is a link between inadequate, low-quality sleep and healthy teen.
Teenagers with inefficient sleep (meaning they have trouble falling asleep or wake early) and those with insufficient sleep (less or equal to 6.5 hours a day) had an increased risk of having elevated blood pressure.
Even after adjustment for other possible contributing factors, teens with poor sleeping patterns had systolic blood-pressure levels that were on average 4 mm Hg higher than other children; which is really significant.
This is just one reason to push us more into giving our sleep time more importance. There are several other reasons.
Did you ever think that a disease as complicated as cancer can be treated by something as simple as a vitamin?!?!?
A recent study on mice have shown that vitamin C can have a role in the reduction of tumor size.
But how does it do so? Although vitamin C is an antioxidant, meaning that it removes free radicals which lead to cancer, it is also a pro oxidant. And fortunately, its a pro oxidant only towards malignant cells.
A single parenteral doses of vitamin C, in the study, led to free radical formation only in tumor tissue without any signs of free radicals in the blood.
Despite its potential role in chemotherapy, vitamin C cannot be considered curative as a single agent yet. However, using it as an addition to other regimens is a good idea, especially if used against tumors with poor prognosis.
Have you ever wondered about synchronizing your Hotmail inbox without Microsoft Outlook and for FREE..
Now it is possible with Microsoft Office Oulook Connector where you can use Microsoft Office Outlook 2003 or Microsoft Office Outlook 2007 to access and manage your Microsoft Windows Live Hotmail or Microsoft Office Live Mail accounts, including e-mail messages and contacts.
In this part of the tutorial, we will have a look about how to create a project. We will also cover how to add your company’s logo, which is really interesting when it comes to presenting the project. Also we will start adding the activities or events that we have in order to accomplish the whole project.
Creating projects in Primavera 3.0 (P3) is easy. Simply establish the objective and specify a start date.
1.Click Start, Programs, Primavera, and then select Primavera Project Planner.
2.Choose File, New, then type a unique four-character project name
3.Enter the version number, project title, and company name.
4.Specify the planning unit which determines the time unit P3 uses to schedule the project. In our case, it is days. Also we have to choose the Workdays/week, which is “6” in our case since Sundays are off. In addition, we have to specify that the Week starts on Monday. Read more…