Lectures

Lab 10

Batch Processing - Motion Tracking

Synopsis In Lecture 11, we learned how to write all of the components of a motion tracking program. In this lab, we will put those components together to process the two video sequences. Daily Quiz Quiz 20 Lab 10 Download the raw data... [Read More]

Lecture 11

Batch Processing - Motion Tracking

Synopsis At this point, we've touched on all of the key elements of MATLAB programming: data types, data structures, control structures, scripts, functions, and plotting. Now it's time to put these elements together and tackle one of the most common tasks--batch processing. In this lecture, we will lay the groundwork... [Read More]

Lab 9

Chapter 10 & 13 - Advanced Functions & Sights and Sounds

Synopsis In the past two lectures, we learned a variety of new ways to increase the flexibility of our functions, and were introduced to functions that help with handling audio/visual files. This lab will combine these two topics. We will use anonymous functions to perform different operations on our audio... [Read More]

Lecture 10

Chapter 13 - Sights and Sounds

Synopsis We have now seen all of the primary data types, control structures, and programming paradigms within MATLAB. From this point on, we will be looking into more nuanced features that will make your data analysis jobs easier. In this lecture, we will cover the first section of Chapter 13... [Read More]

Lecture 9

Chapter 10 - Advanced Functions

Synopsis In Lecture 3 and Lecture 6, we have discussed how to define functions and subfunctions. In this lecture, we will introduce even more types of functions and the concept of function handles. In addition, we will cover additional topics from Chapter 10 - Advanced Functions including recursion.... [Read More]

Lab 8

Chapter 9 - Advanced File Input and Output

Synopsis In Lecture 8, we were introduced to a variety of mid- and low-level file I/O functions. We will use those functions today to extract data from a real-world dataset. Our primary goal will be to extract the age at initial diagnosis for GBM patients involved in the TCGA... [Read More]

Lecture 8

Chapter 9 - Advanced File Input and Output

Synopsis In Lecture 3 and Lab 2, we covered basic input and output (I/O) functions. In this lecture, we will discuss lower-level file I/O from Chapter 9: Advanced File Input and Output. We will learn how to read in a variety of file formats, and extend functions such... [Read More]

Lecture 7

Chapter 8 - Data Structures - Cell Arrays and Structures

Synopsis In past lectures, we've covered data structures such arrays. In this lecture, we will introduce two more data structures from Chapter 8 - Data Structures: cell arrays and structures. The topics that will be covered include initialization, reference, modifying, and nesting of cell arrays and structures. In addition to... [Read More]

Lab 6

Chapter 7 - String Manipulation

Synopsis Chapter 7: String Manipulation covers a variety of functions that are useful for dealing with strings. But instead of providing a list and description of each function, we will explore string manipulation methods in the context of a coding problem. Our goal is to simulate the Infinite Monkey... [Read More]

Lab 5

Chapter 6 - MATLAB Programs

Synopsis In Lecture 6, we took a Modular Programming approach to outline a human vs. computer game of Tic-Tac-Toe. As we discussed, Modular Programming allows us to break apart a challenging task into smaller jobs that can be handled by separate functions. In this class, you will form teams... [Read More]

Lecture 6

Chapter 6 - MATLAB Programs

Synopsis In the past lectures, we've seen many of the fundamental elements of programming. We can now put these elements together to build more elaborate MATLAB programs. One method for piecing these elements together is called Modular Programming. In this lecture, we will outline the idea for a modular game... [Read More]

Lab 4

Chapter 5 - Loop Statements and Vectorizing Code

Synopsis In Lecture 5, we learned about a new type of control statement that allows us to repeatedly execute lines of code. We also learned the importance of leveraging MATLAB's ability to efficiently handle vectors and matrices in place of loops. In this lab, you will use the skills... [Read More]

Lecture 5

Chapter 5 - Loop Statements and Vectorizing Code

Synopsis In Lecture 4, we learned how to use conditional statements to selectively execute pieces of code. In this class, we will discuss the contents of Chapter 5: Loop Statements and Vectorizing Code, and learn how to repeatedly execute lines of code to perform different tasks. The topics that... [Read More]

Lab 3

Chapter 4 - Selection Statements

Synopsis In Lecture 3, we wrote a MATLAB program that interacts with users via the keyboard. A key part of handling input is checking that the user entered the correct value. In this lab, we will write selection statements to check the value of different user inputs. The topics... [Read More]

Lecture 4

Chapter 4 - Selection Statements

Synopsis In this class, we will discuss the contents of Chapter 4: Selection Statements. The topics that will be covered include if statements, if-else statements, nested if-else statements, and if-elseif statements. Daily Quiz Quiz 5 if Statements Until now, our MATLAB scripts and programs... [Read More]

Lab 2

Chapter 3 - Introduction to MATLAB Programming

Synopsis In Lecture 3, we wrote a MATLAB program that interacts with users via the keyboard and print statements. In this class, we will create a different program that works with files. The topics for this lab include file I/O, functions with multiple arguments, plotting, and plot formatting. ... [Read More]

Lecture 3

Chapter 3 - Introduction to MATLAB Programming

Synopsis In this class, we will discuss the content of Chapter 3: Introduction to MATLAB Programming by developing a MATLAB Program. The topics that will be covered include algorithm design, functions, scripts, input, and output. Daily Quiz Quiz 3 Programs, Scripts and Functions Thus... [Read More]

Lab 1

Chapter 2 - Vectors and Matrices

Synopsis In this class, we will get hands-on experience with the topics covered in Chapter 2: Vectors and Matrices. You will learn how to instantiate and manipulate vectors and matrices. Daily Quiz Quiz 2 Lab 1 Download and work through the m-file below. <a... [Read More]

Lecture 2

Chapter 2 - Vectors and Matrices

Synopsis In this class, we will review material from Chapter 1: Introduction to MATLAB and get an introduction to Chapter 2: Vectors and Matrices. The topics that will be covered include properties of vectors and matrices, array operations, matrix multiplication, and logical vectors. Daily Quiz Quiz 1... [Read More]

Lecture 1

Chapter 1 - Introduction to MATLAB

Synopsis In this class, we will overview the process of submitting homework assignments and discuss Chapter 1: Introduction to MATLAB. The topics that will be covered include the MATLAB environment, variables, assignment statements, numerical and logical expressions, and character encoding. Submitting Homework Assignments To keep things uniform between... [Read More]

Welcome to CS130R

Course Introduction

Synopsis Welcome to CS130R: Selected Programming Languages - MATLAB. In this class, we will make introductions, review the course syllabus, and get a brief look at MATLAB. Activity 1: Meet the class Please pick up an index card from the front of the class. On the card,... [Read More]