Introduction
Scientific computing–using computer algorithms to solve scientific problems–plays an important role in research for many modern scientific disciplines. By developing computer programs that collect, refine, analyze, and visualize experimental data, scientists are able to explore new scientific hypotheses and broaden their understanding of physical phenomena and relationships. Even in cases where datasets are small and relatively straightforward, using scripted, programming approaches can greatly improve the efficiency and reproducibility of scientific analysis.
Further to this point, it is very likely that as your scientific career progresses, you will find yourself in a situation where using a programmatic approach is required to complete your research work, and/or immensely beneficial and time-saving in comparison to other approaches. Though you may not have expertise with a specific programming application, having knowledge of the basics of programming and scientific computing, and the confidence to experiment and continue to learn will be invaluable assets. To this end, the goal of this workshop is to develop both of these aspects, while also introducing you to best practices in creating and maintaining scientific code.
The purpose of this workshop is to provide you with an introduction to the MATLAB software package and improve your knowledge of programming and scientific computing. In addition, you’ll have an opportunity to further explore climate change over the past decade through a (programmatic) re-visitation of the international weather station data used in your second assignment.
1. Introductory presentation
Slides
2. Objectives
By the end of this workshop, you will be able to:
- Compare and contrast the relative merits of performing analyses interactively (e.g. in spreadsheet) vs. programmatically (i.e. using a scripted approach).
- Identify situations where a programmatic approach would be beneficial.
- Explain the basic elements and principles of scientific programming.
- Run basic commands and execute functions in MATLAB.
- Use your programming knowledge and skills to create working scripts and functions.
- Apply your new skills and knowledge in other programming languages.
3. Submission details
You will submit your deliverables via the GitHub repository that is created for you in GitHub Classroom when you click this link and clone the repository.
When complete, your repository will consist of the following items, which should all be created in the top-level directory of the repository:
- A function named
my_lucky_numbers.m
(Created during Lesson 2) - A figure named
lucky_numbers.png
(Created during Lesson 2) - A function named
simple_stats.m
(Created during Lesson 3) - A script named
process_adelaide.m
(Created during Lesson 4) - A function named
plot_station_data.m
(Created during Lesson 5) - A Markdown document named
reflection.md
that provides a very short reflection on your experience
4. Due dates and assessment rubric
Date Assigned | 2024-11-11 |
---|---|
Date Due | 2024-12-01 |
Weight | 5 points |
Assessment rubric
Lesson(s) | Output(s) | Criteria | Points |
---|---|---|---|
2 & 3 | my_lucky_numbers.m lucky_numbers.png simple_stats.m | Functions run without error, are flexible to different inputs and produce correct outputs | /20 |
2 & 3 | my_lucky_numbers.m lucky_numbers.png simple_stats.m | Figure elements are styled in an appealing and effective manner | /10 |
2 & 3 | my_lucky_numbers.m lucky_numbers.png simple_stats.m | Function and script are appropriately commented so as to be understood by an external reviewer | /10 |
4 & 5 | process_adelaide.m | Runs as expected and creates three appropriately styled and named figures | /25 |
4 & 5 | plot_station_data.m | Runs as expected and creates appropriately styled and named figures | /15 |
4 & 5 | process_adelaide.m plot_station_data.m | Function and script are appropriately commented to be understood by an external reviewer | /10 |
– | Question response and reflection | Response is complete, well-composed, and shows depth of thought | /10 |
5. Get started
Ready to start? Head to the preparation page and follow the instructions to get your software (MATLAB Online) and data ready.