0% found this document useful (0 votes)
3 views

Week 1 Part 2 Fundamentals

The document provides an introduction to MATLAB, a programming and numeric computing environment used for data analysis and algorithm development. It covers how to access MATLAB, the desktop interface, obtaining help, and basic debugging techniques. Additionally, it includes a MATLAB Cheat Sheet and links to further resources like MATLAB Live Scripts.

Uploaded by

Ngọc Vi Cao
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

Week 1 Part 2 Fundamentals

The document provides an introduction to MATLAB, a programming and numeric computing environment used for data analysis and algorithm development. It covers how to access MATLAB, the desktop interface, obtaining help, and basic debugging techniques. Additionally, it includes a MATLAB Cheat Sheet and links to further resources like MATLAB Live Scripts.

Uploaded by

Ngọc Vi Cao
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 15

Fundamentals

Where do I find MATLAB? Here!

Do I have to have MATLAB installed on my computer right


now? No, you can use MATLAB Online!

© 2023 Introduction to Programming in MATLAB (1), Fundamentals 1


Table of Contents

What we've covered this week in Part 1What is MATLAB?


How to access MATLAB The MATLAB Desktop
MATLAB Cheat Sheet Obtaining Help in MATLAB
Basic Debugging in MATLABWhat we've learnt this week in Part 2

MATLAB Live Script

© 2023 Introduction to Programming in MATLAB (1), Fundamentals 2


What we've covered this week in Part 1

This week in Part 1 we learnt about:


• What programming is

© 2023 Introduction to Programming in MATLAB (1), Fundamentals 3


What is MATLAB?

What is MATLAB? Video

MATLAB is a programming and numeric computing environment used by millions of


engineers and scientists to analyse data, develop algorithms, and create models.
MATLAB provides professionally developed toolboxes for signal and image processing,
control systems, wireless communications, computational finance, robotics, deep
learning, and AI and more.

MATLAB combines a desktop environment tuned for iterative analysis and design
processes with a high-level programming language that expresses matrix and array
mathematics directly. It includes the Live Editor for creating scripts that combine code,
output, and formatted text in an executable notebook. Prebuilt apps allow you to
interactively perform iterative tasks. You can then automatically generate the
corresponding MATLAB code to reproduce your work and add it to your script with a push
of a button.

© 2023 Introduction to Programming in MATLAB (1), Fundamentals 4


How to access MATLAB
See Getting Started With MATLAB for instructions on how to get MATLAB.

© 2023 Introduction to Programming in MATLAB (1), Fundamentals 5


The MATLAB Desktop
By default, MATLAB displays a desktop interface divided into three core components: the
Command Window, the Workspace Browser, and the Current Folder Browser. Other
components and windows are automatically opened as necessary.

© 2023 Introduction to Programming in MATLAB (1), Fundamentals 6


MATLAB Cheat Sheet
See the MATLAB Cheat Sheet for a quick reference to some basic MATLAB
functions.

© 2023 Introduction to Programming in MATLAB (1), Fundamentals 7


Obtaining Help in MATLAB
MATLAB help and documentation can show you

 The various ways to call a function


 The algorithm implemented by a function
 Examples of how to use a function
 Links to related functions
 Tutorials and background information

© 2023 Introduction to Programming in MATLAB (1), Fundamentals 8


Obtaining Help in MATLAB
To display documentation on a particular function, type the word "doc" and the name of
the function:
doc plot

For quick help on the function in the Command Window, type


help plot

The MATLAB Help browser opens to the appropriate documentation. If you want to
search or browse the documentation, enter
doc

to open the Help browser to its main page. You can then search by keywords or browse
by topic.

© 2023 Introduction to Programming in MATLAB (1), Fundamentals 9


Obtaining Help in MATLAB
Help is also available “on the fly”. You can highlight any command or function name and
press F1 to bring up a pop-up help window on that function.

Basic syntactic help appears automatically (after a short pause) after you enter the name
of a function and an open parenthesis:

You can also bring up this syntax help by pressing Ctrl+F1. You can remove it by
pressing Esc.

© 2023 Introduction to Programming in MATLAB (1), Fundamentals 10


Basic Debugging in MATLAB
If you encounter run-time errors in MATLAB, the run-time stack appears in the MATLAB
command window. Use the error message and stack information to learn more about the
source of the error, and then either fix the issue or add error-handling code (more on
error-handling in week 5: Functions and Graphing [KS1] [MR2] ). The stack information
includes:

 The name of the function that generated the error


 The line number of the attempted operation
 The sequence of function calls that led up to the execution of the function and
the line at which each of these function calls occurred

© 2023 Introduction to Programming in MATLAB (1), Fundamentals 11


Obtaining Help in MATLAB

[KS1]Link to week 5’s live script

[MR2]Open thread since it depends on the final version in Ulwazi


© 2023 Introduction to Programming in MATLAB (1), Fundamentals 12
Obtaining Help in MATLAB

[KS1]Link to week 5’s live script

[MR2]Open thread since it depends on the final version in Ulwazi

© 2023 Introduction to Programming in MATLAB (1), Fundamentals 13


What we've covered this week in Part 2
This week in Part 2 we learnt about:

 How to access MATLAB


 The MATLAB desktop
 MATLAB Cheat Sheet
 Obtaining help in MATLAB
 Basic debugging in MATLAB

© 2023 Introduction to Programming in MATLAB (1), Fundamentals 14


MATLAB Live Script
Click on the link below for this lecture’s MATLAB live Script

• Week_1_Part_2_Fundamentals.mlx

© 2023 Introduction to Programming in MATLAB (1), Fundamentals 15

You might also like