Challenges

During the workshop, activities are provided so that you can engage and test out the content shown for yourself. These are referred to as challenges.

1 Getting Started

1.1 Using MATLAB as a Calculator

Use the MATLAB command prompt to perform the following operations:

Answer the following questions:

1.2 Saving your work

2 Variables

2.1 The magic number

2.2 The Workspace

Hint: To save only one variable, x, use: >> save filename.mat x and to clear only one variable, x, use: >> clear x

When you load a Workspace, this won't clear existing variables in your Workspace; it will add to your existing Workspace.

2.3 Extension: What's in a name

3 Vectors and matrices

3.1 Vectors and matrices

Hint: You can check the size of a variable x, on MATLAB using the function size(x)

3.2 Random arrays

Hint: To get random numbers in MATLAB you will need to use the rand() function. Use 'Search Documentation' in the top right corner to learn aboutrand

3.3 Indexing

4 Array Operations

4.1 Operation matrix

Hint: Recall you can check the size of a variable using the function size()

4.2 Extension

Last updated