MATLAB (1)

CS1 in MATLAB Peer Instruction Materials

Topics Coverage Summary: variables, types, assignment, order of operations, vector indexing, matrix indexing, RGB color scheme and RGB image matrices, scripts, functions, scope, conditional statements, logical expressions, shortcutting, logical matrix indexing, for loops, while loops, sparse matrices

Number of Questions/Slides Available: 78

Materials Author: Cynthia Lee, Stanford University

This course and some of its peer instruction materials were featured on Computing Education Blog: Making a Media Computation class in MATLAB at UCSD.


Sample Peer Instruction Questions (click to enlarge):


Creative Commons License
Intro. MATLAB Peer Instruction Lecture Slides by Dr. Cynthia Lee, UCSD is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.
Based on a work at www.peerinstruction4cs.org.
Permissions beyond the scope of this license may be available at http://www.peerinstruction4cs.org/2012/03/29/cs1-in-matlab-peer-instruction-materials/.


Materials are divided into lectures that were 50 minutes long. This gives you an idea how much material, at most, you are likely to be able to cover in one class period. However, please note that in many lectures, significant time was spent on administrative tasks, or reviewing homework or labs, or doing demonstrations relating to homework and lab, etc. So you will often need to add material in order to fill a lecture.

Lecture01.Intro to the course and to PI procedure

Lecture02.Assignment and RGB color codes

Lecture03.Variable names and Strings ASCII and eror messages

Lecture04.Vector indexing

Lecture05.RGB image (matrix) format and Matrix indexing

Lecture06.More matrix indexing (select quadrants) and functions zeros and cat

Lecture07and08.Scripts and Functions and Scope issues

Lecture09.Relational and Logical operators and Greenscreen effectspptx

Lecture10.Conditional If Else Elseifpptx

Lecture11.Compound logical expressionspptx

Lecture12.Loops introductionpptx

Lecture13.Nested loops

Lecture14.For loop implicit vector and While loop intro

Lecture15.Switch case example and While loop countingpptx

Lecture16.Selecting the apporpriate control flow for the problempptx

Lecture17.While loops and nested loops practice

Lecture18and19.Using loops and greenscreen to create animation