Matlab for absolute beginners: elevation surveys

Lisa Gilbert, Cabrillo College, Earth Sciences

Author Profile
Initial Publication Date: October 6, 2026 | File/Data Set Update: October 27, 2026
DOI | Cite this

Summary

For students who have absolutely no experience with MATLAB and little to no experience coding, this in-class activity is a guided introduction intended to help them develop some basic skills and confidence. The activity guides students to enter and format data, correct mistakes, and interpret error messages. Then, they generate scatter plots of real elevation survey data and practice changing basic properties of the figures. At the end of the 1-hour activity, students save the figure and data files.

Share your modifications and improvements to this activity through the Community Contribution Tool »

Learning Goals

By the end of this 1-hour activity, students will be able to:

  1. Accurately input numerical survey data into MATLAB variables and resolve a simple syntax error using MATLAB error messages.
  2. Create scatter plots from elevation survey data, modify basic figure properties (axes, titles, markers), and save the resulting figure and data files.
  3. Reflect on their confidence in scientific computing.

Context for Use

This activity can be used in undergraduate or advanced high school courses with students who are brand-new to coding. The instructions are written for an in-class implementation, but can also be used online.

The intended audience is students who have absolutely no experience with MATLAB and little to no experience coding, and targets those with low confidence in computing.

The only technical knowledge/skill is that they can log in to MATLAB online and know how to copy/paste data from a spreadsheet.

Description and Teaching Materials

The assignment sheet guides students through the steps after they have logged into MATLAB. While students could make a plot of elevation data using other software such as Google Sheets or Excel, this introduction helps orient students unfamiliar with MATLAB. This exercise also sets students up to make publication-ready figures.

The sample data used for part of the exercise are from a beach elevation profile, but an instructor could use other data available to them.
Student Handout for Matlab for absolute beginners: elevation surveys (Acrobat (PDF) 112kB Oct27 26) 
Sample data for Matlab for absolute beginners: elevation surveys (Comma Separated Values 300bytes Sep30 26) 

Teaching Notes and Tips

In a 1-hour class period, support students to first log in to their MATLAB online account (required). Each student should be working on their own computer but have a partner nearby to check in with as needed. Each student receives a printed or electronic copy of the assignment sheet to complete.

After everyone is logged in, the instructor asks students to read the "Before you begin" statements on the assignment sheet and rate how true they true each one is for them.

a) I have experience with computer coding. Very true | Somewhat | Neutral | Not really | Not at all true
b) The idea of computer coding terrifies me. Very true | Somewhat | Neutral | Not really | Not at all true

The instructor invites students to share their ratings with their partner and then explicitly states that the activity is intended to help absolute beginners. Those with experience, can be encouraged to offer grace and support to peers who are just starting out. Also, the instructor reminds students that if at any point they are stuck and their partner can't help, to raise their hand.

The instructor begins by sharing their screen and walking students through steps 1 through 3, asking for a thumbs up when each step is complete.

Then, students work through step 4 to the end, with the support of a peer. If possible, the instructor moves around the classroom to check in with students who are struggling.


Assessment

A student has achieved the learning goals if they:

1. Complete the steps to successfully generate the plot.
2. Complete the self-assessment (questions #20 and 21 on the handout).

References and Resources

For students who want a more thorough, self-paced introduction to MATLAB can be directed to the on-ramp: https://matlabacademy.mathworks.com/details/matlab-onramp/gettingstarted.