




























































































Estude fácil! Tem muito documento disponível na Docsity
Ganhe pontos ajudando outros esrudantes ou compre um plano Premium
Prepare-se para as provas
Estude fácil! Tem muito documento disponível na Docsity
Prepare-se para as provas com trabalhos de outros alunos como você, aqui na Docsity
Encontra documentos específicos para os exames da tua universidade
Prepare-se com as videoaulas e exercícios resolvidos criados a partir da grade da sua Universidade
Responda perguntas de provas passadas e avalie sua preparação.
Ganhe pontos para baixar
Ganhe pontos ajudando outros esrudantes ou compre um plano Premium
Este documento fornece informações básicas sobre a utilização da matlab, enfatizando a computação da soma de elementos em matrizes. Apresenta o funcionamento da matlab, como obter a soma de elementos em linhas e colunas, e como transpor matrizes. Além disso, discute a representação de gráficos em matlab.
Tipologia: Notas de estudo
1 / 185
Esta página não é visível na pré-visualização
Não perca as partes importantes!





























































































Getting Started with MATLAB ®
M ATLAB
The Language of Technical Computing
Contents
1
2
3
4
5 6
1 Introduction
What Is MATLAB?
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.
MATLAB features a family of add-on application-specific solutions called toolboxes. Very important to most users of MATLAB, toolboxes allow you to learn and apply specialized technology. Toolboxes are comprehensive collections of MATLAB functions (M-files) that extend the MATLAB environment to solve particular classes of problems. Areas in which toolboxes are available include signal processing, control systems, neural networks, fuzzy logic, wavelets, simulation, and many others.
1 Introduction
MATLAB Documentation
MATLAB provides extensive documentation, in both printed and online format, to help you learn about and use all of its features. If you are a new user, start with this Getting Started book. It covers all the primary MATLAB features at a high level, including many examples. The MATLAB online help provides task-oriented and reference information about MATLAB features. MATLAB documentation is also available in printed form and in PDF format.
MATLAB Online Help To view the online documentation, select MATLAB Help from the Help menu in MATLAB. The MATLAB documentation is organized into these main topics:
- Desktop Tools and Development Environment — Startup and shutdown, the desktop, and other tools that help you use MATLAB - Mathematics — Mathematical operations and data analysis - Programming — The MATLAB language and how to develop MATLAB applications - Graphics — Tools and techniques for plotting, graph annotation, printing, and programming with Handle Graphics® - 3-D Visualization — Visualizing surface and volume data, transparency, and viewing and lighting techniques - Creating Graphical User Interfaces — GUI-building tools and how to write callback functions - External Interfaces/API — MEX-files, the MATLAB engine, and interfacing to Java, COM, and the serial port
MATLAB also includes reference documentation for all MATLAB functions:
- Functions - By Category — Lists all MATLAB functions grouped into categories - Handle Graphics Property Browser — Provides easy access to descriptions of graphics object properties - External Interfaces/API Reference — Covers those functions used by the MATLAB external interfaces, providing information on syntax in the calling language, description, arguments, return values, and examples
MATLAB Documentation
The MATLAB online documentation also includes
- Examples — An index of examples included in the documentation - Release Notes — New features and known problems in the current release - Printable Documentation — PDF versions of the documentation suitable for printing
For more information about using the Help browser, see Chapter 6, “Desktop Tools and Development Environment.”
Starting and Quitting MATLAB
MATLAB Desktop When you start MATLAB, the MATLAB desktop appears, containing tools (graphical user interfaces) for managing files, variables, and applications associated with MATLAB.
The following illustration shows the default desktop. You can customize the arrangement of tools and documents to suit your needs. For more information about the desktop tools, see Chapter 6, “Desktop Tools and Development Environment.”
Enter MATLAB functions at the Command Window prompt.
The Command History maintains a record of the MATLAB functions you ran.
1 Introduction
2 Matrices and Arrays
Matrices and Magic Squares
In MATLAB, a matrix is a rectangular array of numbers. Special meaning is sometimes attached to 1-by-1 matrices, which are scalars, and to matrices with only one row or column, which are vectors. MATLAB has other ways of storing both numeric and nonnumeric data, but in the beginning, it is usually best to think of everything as a matrix. The operations in MATLAB are designed to be as natural as possible. Where other programming languages work with numbers one at a time, MATLAB allows you to work with entire matrices quickly and easily. A good example matrix, used throughout this book, appears in the Renaissance engraving Melencolia I by the German artist and amateur mathematician Albrecht Dürer.
Matrices and Magic Squares
This image is filled with mathematical symbolism, and if you look carefully, you will see a matrix in the upper right corner. This matrix is known as a magic square and was believed by many in Dürer’s time to have genuinely magical properties. It does turn out to have some fascinating characteristics worth exploring.
Entering Matrices
The best way for you to get started with MATLAB is to learn how to handle matrices. Start MATLAB and follow along with each example.
You can enter matrices into MATLAB in several different ways:
- Enter an explicit list of elements. - Load matrices from external data files. - Generate matrices using built-in functions. - Create matrices with your own functions in M-files.
Start by entering Dürer’s matrix as a list of its elements. You only have to follow a few basic conventions:
- Separate the elements of a row with blanks or commas. - Use a semicolon, ; , to indicate the end of each row. - Surround the entire list of elements with square brackets, [ ].