BtM 2018, Week 12

In Week 12, we are starting to focus on getting student projects underway. Our lab session on Thursday will not be dedicated to a new lab, but to your projects… and, if you need, an opportunity to finish up any late labs. Meanwhile, the instruction part will talk about the tools you need to set up your own environment, both for the project and your future individual work.

Note:

  • The deadline for Lab 11 is Thursday, Nov 15.
  • No labs will be accepted, even late, by Andrew (TA) after November 30.

Documents for download:

 

 

BtM 2018, Week 11

Hi BtM students – week 11 is here! Our topic is errors, bugs, mistakes: How to find them in your code, and how to avoid them.

The slides are here. And the sample code we played with in class is here.

As for this week’s lab, it consists in finding 10 errors in a pice of MATLAB code, and answering one question. The code file is here. It calculates Fibonacci numbers, and the ratio of successive numbers, which converge towards the golden ratio (1.61803…). The intended output is this plot:

As for your task:

  • Make a clean (untouched) copy of your code file first, before working on it. The code won’t even run until you’ve found and corrected the syntax and runtime errors.
  • There are 10 errors in it. For each, you need to provide the line, the error message (if there is one) and the type (syntax error, runtime error or logical error).
  • Look at the help MATLAB gives you – red and orange bars at the right edge.
  • In addition to the debugging, you are also to use the debugger to find out the value of the variable ii on the second iteration of the for-loop. For this, you need to set a break point at the beginning of the loop, and then use the “step” button to proceed step-by-step. Keep an eye in how ii changes. The second value of ii is what you are asked to find. Before tackling this task, you’ll have to have found the first two errors, otherwise you can’t run the loop! (If you still have trouble, you can, in a copy of the file, delete or comment out what comes after the loop so that errors in this part don’t prevent you from running it.)

BtM 2018, Week 10

More Unix/Linux shell, and some introduction to shell scripting!

Reading:

BtM 2018, Week 3

Week three will be largely dedicated to getting a lot of practice with what we’ve learned so far:

  1. Practice with vectors and other variables
  2. Practice writing functions
  3. Practice reading code and making small changes
  4. … and a main topic: conditional statements (if-elseif-else-end and switch-case-otherwise-end)

Things to do:

In addition  we’ll also be preparing to look at how code files are organized. One key tool to help programmers organize and manage their code is a  version control system (VCS).  VCSs also help share code and collaborate via web-based  repositories.  A popular VCS is called git, and a popular online repository site is Github. UAF has its own internal enterprise installation of Github, which we can use just like the public free Github site, but without having to share our code with the rest of the world.

To prepare, here are two things you can do:

  • Try to log in at the UA Github  with your UAlaska credentials.
  • Watch the following 5 min video:

 

Confused? Never heard of such a thing before? Want a more gentle intro? I like this one too (14 min).

 

BtM 2018, Week 2

Good to see you back for week 2!

Our goals this week are:

  1. Review / clean up for week 1
  2. More on data types
  3. Matrices, vectors and cell arrays (and a sneak peek preview of structs)
  4. Relational operators

Things to do:

  1. Download the  extended slides with notes.
  2. Download the lab file.
  3. Do the readings

During lab this week, I will meet with the grad students to discuss their projects. Projects will require: A problem description; a dataset; data processing; data visualization; an online report / web page (several options for that!); and a 10 min presentation in class. It would be a good idea to start thinking about your interests.

Welcome to Beyond the Mouse – and Week 1 of our Fall 2018 session

Week 1 of Beyond the Mouse will introduce you to each other and to programming as a skill.

Learning goals are:

  1. Orient yourself in the MATLAB interface and the computing lab
  2. Understand the following concepts: variables, operators number literals, statements, functions
  3. Write your first small pieces of script and your first function.

Things to do:

  1. Download the updated syllabus .
  2. Download the extended slides with notes.
  3. Download the lab files.
  4. Do the optional readings: