Download presentation
Presentation is loading. Please wait.
1
Matlab
2
MATLAB is a multi-paradigm numerical computing environment
fourth-generation programming language. A proprietary programming language developed by MathWorks In 2004, MATLAB had around one million users across industry and academia. Cleve Moler, the chairman of the computer science department at the University of New Mexico, started developing MATLAB in the late 1970s
3
Become a Friend of Matlab
Why? It has very attractive visualizations It wants to be your friend: Very easy to learn Great HELP menu and tutorial Very useful: From a simple calculator to complex data analysis toolbox. Many implemented algorithms. We all have experimental data that we need to quantify, analyze, and visualize (in a certain way – for a paper etc…) We usually need to repeat our experiments and analysis more than one time
4
What Is MATLAB? MATLAB (MATrix LABoratory) Typical uses include:
high-performance language for technical computing computation, visualization, and programming in an easy-to-use environment Typical uses include: Math and computation Algorithm development Modelling, simulation, and prototyping Data analysis, exploration, and visualization Scientific and engineering graphics Application development, including Graphical User Interface building
5
Why Matlab? A good choice for vision program development because:
Easy to do very rapid prototyping Quick to learn, and good documentation A good library of image processing functions Excellent display capabilities Widely used for teaching and research in universities and industry Another language to impress your boss with !
6
MATLAB Components MATLAB consists of: The MATLAB language
a high-level matrix/array language with control flow statements, functions, data structures, input/output, and object-oriented programming features. The MATLAB working environment the set of tools and facilities that you work with as the MATLAB user or programmer, including tools for developing, managing, debugging, and profiling Handle Graphics the MATLAB graphics system. It includes high-level commands for two-dimensional and three-dimensional data visualization, image processing, animation, and presentation graphics.
7
MATLAB Components The MATLAB function library.
a vast collection of computational algorithms ranging from elementary functions like sum, sine, cosine, and complex arithmetic, to more sophisticated functions like matrix inverse, matrix eigenvalues, Bessel functions, and fast Fourier transforms as well as special image processing related functions The MATLAB Application Program Interface (API) a library that allows you to write C and Fortran programs that interact with MATLAB. It include facilities for calling routines from MATLAB (dynamic linking), calling MATLAB as a computational engine, and for reading and writing MAT-files.
8
Some facts for a first impression
Everything in MATLAB is a matrix ! MATLAB is an interpreted language, no compilation needed (but possible) MATLAB does not need any variable declarations, no dimension statements, has no packaging, no storage allocation, no pointers Programs can be run step by step, with full access to all variables, functions etc.
9
The Matlab environment
10
EVERYTHING IN MATLAB IS A MATRIX !
What does Matlab code look like? Remember: EVERYTHING IN MATLAB IS A MATRIX ! Another simple example: t = 0:pi/100:2*pi; y = sin(t); plot(t,y) creates 1 x 200 Matrix Argument and result: 1 x 200 Matrix
11
What does Matlab code look like?
A simple example: a = 1 while length(a) < 10 a = [0 a] + [a 0] end which prints out Pascal’s triangle: 1 1 1 1 2 1 (with “a=” before each line).
12
What does Matlab code look like?
Another simple example: t = 0:pi/100:2*pi; y = sin(t); plot(t,y)
13
Matrices:
14
Matrices 2 7 4 2 7 4 2 7 4 3 8 9 Building matrices with [ ]:
15
Matrices:
16
Variables Don’t have to declare type Don’t even have to initialise
Just assign in command window
17
Variable type:
18
Matlab Arithmetic Operators
19
Matlab Special Numbers
20
Try Matlab as a Calculator
21
workspace The workspace is Matlab’s memory
Can manipulate variables stored in the workspace Display contents of workspace >> whos Name Size Bytes Class a x double array b x double array c x double array Delete variable(s) from workspace >> clear all; % delete all variables from workspace
22
Manipulating Matrices
A ' % transpose B*A % matrix multiplication B.*A % element by element multiplication B/A % matrix division B./A % element by element division [B A] % Join matrices (horizontally) [B; A] % Join matrices (vertically)
23
Data analysis workflow:
24
Big Data with MATLAB MATLAB® makes it easy to analyze and visualize your big data so you can improve the design, performance, and reliability of your products. MATLAB is: Easy : Don’t know big data programming? Use familiar MATLAB functions and syntax to work with big datasets, even if they don’t fit in memory. Convenient : Work with the big data storage systems you already use. MATLAB works with your existing systems. Access big data stored in traditional file systems, SQL and NoSQL databases, and Hadoop/HDFS. Scalable : Use the processing platform that suits your needs. Because MATLAB works with your existing systems, you can optimally process your algorithms – without having to rewrite them – using anything from your local desktop machine to Hadoop and Spark.
25
Tree data structure as a MATLAB class
A tree is a hierarchical data structure where every node has exactly one parent (expect the root) and no or several children. Along with this relational structure, each node can store any kind of data. This class implements it using plain MATLAB syntax and arrays. Most useful methods are implemented, using overloading of MATLAB functions for tree objects.
26
@tree http://tinevez.github.io/matlab-tree/index.html
This page serves as a basic documentation or tutorial for class. This tutorial is split into several sections, normally independent. It is a good idea however to read them in order: Introduction to trees, the tree class, and basic information. Creating, modifying and accessing a tree. MATLAB operators for trees. Special trees and methods. Searching a tree. Tree traversal. Plotting a tree.
27
Machine Learning with MATLAB
Engineers and data scientists work with large amounts of data in a variety of formats such as sensor, image, video, telemetry, databases, and more. They use machine learning to find patterns in data and to build models that predict future outcomes based on historical data. With MATLAB®, you have immediate access to prebuilt functions, extensive toolboxes, and specialized apps for classification, regression, and clustering. You can: Compare approaches such as logistic regression, classification trees, support vector machines, ensemble methods, and deep learning. Use model refinement and reduction techniques to create an accurate model that best captures the predictive power of your data. Integrate machine learning models into enterprise systems, clusters, and clouds, and target models to real-time embedded hardware.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.