Showing posts with label Matlab Tutorials. Show all posts
Showing posts with label Matlab Tutorials. Show all posts

Sunday, October 31, 2010

Learn Matlab - A useful matlab ebook

Download Matlab useful ebook for free

This book covers the following chapters

  1. Installing MATLAB
  2. Introduction
  3. Matrices and Arrays
  4. Overview of MATLAB Plotting
  5. Flow Control
  6. Creating Graphical User Interfaces
  7. Desktop Tools and Development Environment
  8. Introducing the Symbolic Math Toolbox
  9. Using the Symbolic Math Toolbox
Download Matlab Free ebook "Learn Matlab" by Mathworks

Read more...

MATLab Signlas and System ebook

Download MATLab free ebook "Signals and system with MATLab"
includes step by step procedure for designing analog and digital filters
This book contains the following chapters

  1. Elementary Signals
  2. Laplace Transformation
  3. Inverse Laplace Transformation
  4. Circuit Analysis with Laplace Transforms
  5. State Variables and State Equations
  6. The impulse response and convolution
  7. Fourier Series
  8. Fourier Transforms
  9. DFT and FFT algorithm
  10. Analog and digital filter
and much more useful chapters.
Each chapter contains numerous practical applications supplemented with detailed instructions for using MATLAB to obtain quick soloutions.

Download "Signals and system with MATLAB" ebook

Read more...

Wednesday, May 12, 2010

Symbolic expressions,variable precision and exact arithmatic in MATLAB

Symbolic Expressions, Variable Precision, and Exact Arithmetic

As we have noted,MATLAB uses floating point arithmetic for its calculations.
Using theSymbolic Math Toolbox,you can also do exact arithmetic with symbolic expressions. Consider the following example:

>> cos(pi/2)
ans =
6.1232e-17
17

The answer is written in floating point format and means 6.1232×10-17 .
However, we know that cos(p/2) is really equal to 0. The inaccuracy is due
to the fact that typing pi in MATLAB gives an approximation to pi accurate
to about 15 digits, not its exact value. To compute an exact answer, instead
of an approximate answer, we must create an exact symbolic representation
of p/2 by typing sym(’pi/2’). Now let’s take the cosine of the symbolic
representation of p/2:
>> cos(sym(’pi/2’))
ans =
0
This is the expected answer.
The quotes around pi/2 in sym(’pi/2’) create a string consisting of the
characters pi/2 and prevent MATLAB from evaluating pi/2 as a floating
point number.The command sym converts the string to asymbolic expression.
The commands sym and syms are closely related. In fact, syms x is equiv-
alent to x = sym(’x’). The command syms has a lasting effect on its argu-
ment (it declares it to be symbolic from now on), while sym has only a tempo-
rary effect unless you assign the output to a variable, as in x = sym(’x’).
Here is how to add 1/2 and 1/3 symbolically:

>> sym(’1/2’) + sym(’1/3’)
ans =
5/6

Finally,you can also dovariable-precision arithmetic with vpa.For example,
v
to print 50 digits of 2, type

>> vpa(’sqrt(2)’, 50)
ans =
1.4142135623730950488016887242096980785696718753769

Read more...

MATLAB Basics Algebra

Algebra
Using MATLAB’s Symbolic MathToolbox, you can carry out algebraic
or symbolic calculations such as factoring polynomials or solving algebraic
equations. Type help symbolic to make sure that the Symbolic Math Tool-
box is installed on your system.
To perform symbolic computations, you must use syms to declare the vari-
ables you plan to use to be symbolic variables.
Consider the following series of commands:
>> syms x y
>> (x - y)*(x - y)ˆ2
ans =
(x-y)^3
>> expand(ans)
ans =
x^3-3*x^2*y+3*x*y^2-y^3
>> factor(ans)
ans =
(x-y)^3

Notice that symbolic output is left-justified, while numeric output is
indented. This feature is often useful in distinguishing symbolic output
from numerical output.

Although MATLAB makes minor simplifications to the expressions you
type, it does not make major changes unless you tell it to. The command ex-
pand told MATLAB to multiply out the expression, and factor forced MAT-
LAB to restore it to factored form.
MATLAB has a command called simplify, which you can sometimes use
to express a formula as simply as possible. For example,

>> simplify((xˆ3 - yˆ3)/(x - y))
ans =
x^2+x*y+y^2
MATLAB has a more robust command, called simple, that sometimes does
a better job than simplify. Try both commands on the trigonometric
expression sin(x)*cos(y) + cos(x)*sin(y) to compare — you’ll have
to read the online help for simple to completely understand the answer.

Read more...

MATLAB BASICS(input & output)



Input and Output
You input commands to MATLAB in the MATLAB Command Window. MAT-
LAB returns output in two ways: Typically, text or numerical output is re-
turned in the same Command Window, but graphical output appears in a
separate graphics window. A sample screen, with both a MATLAB Desktop
and a graphics window, labeled Figure No. 1, is shown in Figure 2–1.
Togeneratethisscreenonyourcomputer,firsttype1/2 + 1/3.Thentype
ezplot(’xˆ3 - x’). While MATLAB is working, it may display a “wait” symbol — for example,
an hourglass appears on many operating systems. Or it may give no visual
evidence until it is finished with its calculation.
Arithmetic
As we have just seen, you can use MATLAB to do arithmetic as you would a
calculator.You can use “+” to add, “-” to subtract , “*” to multiply, “/” to divide,and “ˆ” to exponentiate.
For example,
>> 3ˆ2 - (5 + 4)/2 + 6*3
ans =
22.5000
MATLAB prints the answer and assigns the value to a variable called ans.
If you want to perform further calculations with the answer, you can use the
variable ans rather than retype the answer. For example, you can compute
the sum of the square and the square root of the previous answer as follows:

>> ansˆ2 + sqrt(ans)
ans =
510.9934

Observe that MATLAB assigns a new value to ans witheachcalculation.
Todomorecomplexcalculations,youcanassigncomputedvaluestovariables
of your choosing.
For example,

>> u = cos(10)
u=
-0.8391

>> v = sin(10)
v=
-0.5440
>> uˆ2 + vˆ2
ans =
1

MATLAB uses double-precision floating point arithmetic,which is accurate
to approximately 15 digits;however,MATLAB displays only 5 digits by default.
To display more digits, type format long. Then all subsequent numerical
output will have 15 digits displayed. Type format short to return to 5-digit
display.
MATLAB differs from a calculator in that it can do exact arithmetic. For
example,it can add the fractions 1/2 and 1/3 symbolically to obtain the correct
fraction 5/6.
We discuss how to do this in the section Symbolic Expressions,
Variable Precision, and Exact Arithmetic Post

Read more...

MATLAB Getting Started

Typing in the Command Window
Click in the Command Window to make it active. When a window becomes
active, its titlebar darkens. It is also likely that your cursor will change from outline form to solid, or from light to dark, or it may simply appear. Now you can begin entering commands. Try typing 1+1; then press ENTER or RETURN.Next try factor(123456789),a
nd finally sin(10).Your MATLAB Desktop should look like Figure 1-2.
Interrupting Calculations
If MATLAB is hung up in a calculation, or is just taking too long to perform
anoperation,youcanusuallyabortitbytypingCTRL+C (thatis,holddownthe
key labeled CTRL,or CONTROL, and press C).

MATLAB Windows
We have already described the MATLAB Command Window and the Help
Browser, and have mentioned in passing the Command History window, Cur-
rentDirectorybrowser,Workspacebrowser,andLaunchPad.These,andseve-
ral other windows you will encounter as you work with MATLAB, will allow
youto:controlfilesandfoldersthatyouandMATLABwillneedtoaccess;write
andeditthesmallMATLABprograms(thatis,M-files)thatyouwillutilizeto
run MATLAB most effectively; keep track of the variables and functions that
you define as you use MATLAB; and design graphical models to solve prob-
lems and simulate processes. Some of these windows launch separately, and
some are embedded in the Desktop. You can dock some of those that launch
separately inside the Desktop (through the View:Dock menu button), or you
can separate windows inside your MATLAB Desktop out to your computer
desktop by clicking on the curved arrow in the upper right.
These features are described more thoroughly in Chapter 3. For now, we
want to call your attention to the other main type of window you will en-
counter; namely graphics windows. Many of the commands you issue will
generate graphics or pictures. These will appear in a separate window. MAT-
LAB documentation refers to these as figure windows. In this book, we shall
also call them graphics windows. In Chapter 5, we will teach you how to gen-
erate and manipulate MATLAB graphics windows most effectively.

Ending a Session
ThesimplestwaytoconcludeaMATLABsessionistotypequitattheprompt.
Youcanalsoclickonthespecialsymbolthatclosesyourwindows(usuallyan×
intheupperleft-orright-handcorner).Eitherofthesemayormaynotcloseall
the other MATLAB windows (which we talked about in the last section) that
are open. You may have to close them separately. Indeed, it is our experience
that leaving MATLAB-generated windows around after closing the MATLAB
Desktopmaybehazardoustoyouroperatingsystem.Stillanotherwaytoexit
istousetheExit MATLABoptionfromtheFilemenuoftheDesktop.Before
youexitMATLAB,youshouldbesuretosaveanyvariables,printanygraphics
orotherfilesyouneed,andingeneralcleanupafteryourself

Read more...

What is Matlab

MTLAB is a numerical computing environment and programming language(initially written in C). MATLAB allows easy matrix manipulation,plotting of functions and data implementation of alogrithm,creation of user interface and interfacing with programmes in other languages

MATLAB is a software package that lets you do mathematics and compu-
tation, analyse data, develop algorithms, do simulation and modelling,
and produce graphical displays and graphical user interfaces.
MATLAB is a high-performance language for technical computing. It
integrates computation, visualization, and programming in an easy-to-use
environment where problems and solutions are expressed in familiar
mathematical notation. Typical uses include
•Math and computation
•Algorithm development
•Data acquisition
•Modeling, simulation, and prototyping
•Data analysis, exploration, and visualization
•Scientific and engineering graphics
•Application development, including graphical user interface building
MATLAB is an interactive system whose basic data element is an array that
does not require dimensioning. This allows you to solve many technical
computing problems, especially those with matrix and vector formulations, in
a fraction of the time it would take to write a program in a scalar noninteractive
language such as C or Fortran.
The name MATLAB stands for matrix laboratory. MATLAB was originally
written to provide easy access to matrix software developed by the LINPACK
and EISPACK projects. Today, MATLAB engines incorporate the LAPACK
and BLAS libraries, embedding the state of the art in software for matrix
computation.
MATLAB has evolved over a period of years with input from many users. In
university environments, it is the standard instructional tool for introductory
and advanced courses in mathematics, engineering, and science. In industry,
MATLAB is the tool of choice for high-productivity research, development, and
analysis.

Read more...
Related Posts Plugin for WordPress, Blogger...

http://mosttutorials.blogspot.com/

civil engineering,electrical and other engg. software video tutorials.ebook and setups for free.... SAP2000,ETABS,SAFE,Autocad,revit Architecture,MS Project,Primavera ,Matlab,PSpice and much more

  © Blogger templates Newspaper III by Ourblogtemplates.com 2008

Back to TOP