• MATLAB is a powerful computer programming language. It provides a data
analysis environment based on a Matrix Programming Language which is ideal
for mathematical and statistical applications. Softwares with similar purposes
include GAUSS, Splus, R and Ox.
• MATLAB can run in the edit mode (or interactive mode), ie, executing one com-
mand at a time, interactively. It also runs in the command mode (orbatchmode),
ie, running a long MATLAB program with a series of MATLAB commands.
• The MATLAB editor is a very is flexible and power.
• A MATLAB program consists of statements and commands. If a statement ends
with a semicolon (;) nothing is printed to the screen. If a statement ends
a semicolon (;) the value of thevariable denoted will be printed to the screen.
Here is a small example you can type in interactive mode
a=[1 2 3]
a=[1; 2; 3]
• Routines (programs) in MATLAB end with the statement: return;
• Comments start with the sign %.
• Here is a small program that you can save in a file and execute.
• In linear algebra , matrix multiplications and matrix divisions should be done
with care. The commands are
a=[1 2 3; 4 5 6]; % a has 2 rows and 3 columns. Row 1 contains 1
b=[2 1 0;1 3 1;0 1 4];
c=a*b; % c will be a 2× 3 matrix}
• If X is a T×K matrix, then the element in the i-th row and j-th column is :
Scalars don’t need indexes. Vectors need only one index.
• X(:, 1:2) refers to all rows, columns 1 through 2 of matrix X.
• a=zeros(3,5); % a 3×5 matrix of zeros
• b=ones(2,4); % a 2×4 matrix of ones
• c=eye(4); % a 4×4 identity matrix
• d=i:k:j; % generating a sequence starting from i, advancing by k, stoping at j
• a=sum(x); % summation
• a=mean(x); % mean
• a=prod(x); % product
• a=median(x); % median
• a=sdt(x); % standard deviation
• a=max(x); % maximum
• a=min(x); % minimum
• a=exp(x); % exponential function
• a=log(x); % nature log function
• a=sqrt(x); % square root
• a=pi; % 3.1415926...
• a=gamma(x); % gamma function
• a=sin(x), cos(x), tan(x), arcsin(x); % trigonometric functions
• a=size(x); % dimension of matrix x
• a=length(x); % the size of the longest dimension of x
• a=det(x); % determinant of matrix x
• a=diag(x); % extracting the diagonal elements of matrix x
• y =filter(b,a,X); % This command is very useful in time series analysis and
• rand(’seed’,sd); % set the seed of random number generator to sd
• randn(’seed’,sd); % set the seed of random normal generator to sd
• normpdf(x) % computes the density of a standard normal distribution
• R = normrnd(MU,SIGMA,m,n) % generates normal random numbers with pa-
rameters MU and SIGMA, where scalars m and n are the row and column di-
mensions of R
Start solving your Algebra Problems
in next 5 minutes!
Download (and optional CD)
Click to Buy Now:
2Checkout.com is an authorized reseller
of goods provided by Sofmath
Attention: We are
currently running a special promotional offer
for Algebra-Answer.com visitors -- if you order
Algebra Helper by midnight of
you will pay only $39.99
instead of our regular price of $74.99 -- this is $35 in
savings ! In order to take advantage of this
offer, you need to order by clicking on one of
the buttons on the left, not through our regular
If you order now you will also receive 30 minute live session from tutor.com for a 1$!
You Will Learn Algebra Better - Guaranteed!
Just take a look how incredibly simple Algebra Helper is:
: Enter your homework problem in an easy WYSIWYG (What you see is what you get) algebra editor:
Step 2 :
Let Algebra Helper solve it:
Step 3 : Ask for an explanation for the steps you don't understand:
Algebra Helper can solve problems in all the following areas:
simplification of algebraic expressions (operations
with polynomials (simplifying, degree, synthetic division...), exponential expressions, fractions and roots
(radicals), absolute values)