Skip to content

williamjsdavis/CIDER2022-tutorial-1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 

Repository files navigation

CIDER2022-tutorial-1

CIDER 2022: Tutorial 1: Overview and Setup

William Davis, June 20

Overview

This tutorial will be an introduction and overview of the computing tools that you will use. We will cover:

  • Python
    • Using Google Colab
  • MATLAB

If you have experience with computing, take this time to teach a colleague! 🙂

Python

We will be using python in Google Colab notebooks.

Requirements:

  • Google account

Getting started

In the tutorial I will go over:

  • Basics of notebooks
  • Running pre-prepared notebooks
  • Reading/saving data
  • Using packages
  • Getting new packages
  • Q&A (throughout)

Basic features overview of Google Colab

To make a new notebook:

Google Drive -> New -> More -> Google Colaboratory

Check the version with !python --version

Loading notebooks

Download daisyworld.ipynb from the python/ directory.

Python resources

MATLAB

We will be using MATLAB in the official IDE (interactive development environment).

Requirements:

  • MATLAB with the free 30 day trial (you should have already downloaded and set up this)

Getting started

In the tutorial I will go over:

  • IDE overview
  • Using the command window
  • Using the editor
  • Navigating folders and path
  • Documentation
  • Scripts and functions
  • Using non-library code
    • Download package from https://github.com/williamjsdavis/secn-PR
  • Reading/saving data
  • Q&A (throughout)

MATLAB comprehension

Try these yourself, or work with others 🙂

  • Write a function and save it as a .m file
    • The function can be anything you like, e.g. sum the first 1000 primes
  • Run that function in the command window
  • Run that function from a .m script
  • Write another function that calls the first one. Save that to a file
  • Repeat 2&3 for this new function
  • Write a script that calls another script
    • Why would this be useful? What benefit/difficulty does this have over a function?
  • Write a function and then rename it. See what happens
  • Write a function and put it at the bottom of a script. Call it at the top of the script. What happens?
    • Try writing a function in the middle of a script and see what happens
  • Look into anonymous functions
  • Run the following code snippet
    • A = [0,0,0];B = A;B(2) = 1;A
    • Is this what you expected?
    • Try something similar in python and see what happens

MATLAB resources

Other resources

About

CIDER 2022: Tutorial 1: Overview and Setup

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors