diff --git a/episodes/01-intro.md b/episodes/01-intro.md index 3d1a41ad..a890cd57 100644 --- a/episodes/01-intro.md +++ b/episodes/01-intro.md @@ -6,19 +6,19 @@ exercises: 20 ::::::::::::::::::::::::::::::::::::::: objectives -- "Navigate among important sections of the MATLAB environment." -- "Assign values to variables." -- "Identify what type of data is stored in a variable." -- "Creating simple arrays." -- "Be able to explore the values of saved variables." -- "Learn how to delete variables and keep things tidy." +- Navigate among important sections of the MATLAB environment. +- Assign values to variables. +- Identify what type of data is stored in a variable. +- Creating simple arrays. +- Be able to explore the values of saved variables. +- Learn how to delete variables and keep things tidy. :::::::::::::::::::::::::::::::::::::::::::::::::: :::::::::::::::::::::::::::::::::::::::: questions -- "How can I store values and do simple calculations with them?" -- "Which type of operations can I do?" +- How can I store values and do simple calculations with them? +- Which type of operations can I do? :::::::::::::::::::::::::::::::::::::::::::::::::: @@ -463,12 +463,12 @@ Again, be careful usig this command, there is no way back! :::::::::::::::::::::::::::::::::::::::: keypoints -- "Variables store data for future use. Their names must start with a letter, and can have underscores and numbers." -- "We can add, substract, multiply, divide and potentiate numbers." -- "We can also compare variables with `<`, `>`, `==`, `>=`, `<=`, `~=`, and use `~` to negate the result." -- "MATLAB stores data in arrays. The data in an array has to be of the same type." -- "You can supress output with `;`, and print a variable with `disp`." -- "Use `clear` to delete variables, and `clc` to clear the console." +- Variables store data for future use. Their names must start with a letter, and can have underscores and numbers. +- We can add, substract, multiply, divide and potentiate numbers. +- We can also compare variables with `<`, `>`, `==`, `>=`, `<=`, `~=`, and use `~` to negate the result. +- MATLAB stores data in arrays. The data in an array has to be of the same type. +- You can supress output with `;`, and print a variable with `disp`. +- Use `clear` to delete variables, and `clc` to clear the console. :::::::::::::::::::::::::::::::::::::::::::::::::: diff --git a/episodes/02-arrays.md b/episodes/02-arrays.md index 1c473c5e..3bd313d4 100644 --- a/episodes/02-arrays.md +++ b/episodes/02-arrays.md @@ -6,14 +6,14 @@ exercises: 20 ::::::::::::::::::::::::::::::::::::::: objectives -- "Learn how to create multidimensional arrays" -- "Select individual values and subsections of an array." +- Learn how to create multidimensional arrays +- Select individual values and subsections of an array. :::::::::::::::::::::::::::::::::::::::::::::::::: :::::::::::::::::::::::::::::::::::::::: questions -- "How can I access the information in an array?" +- How can I access the information in an array? :::::::::::::::::::::::::::::::::::::::::::::::::: @@ -459,14 +459,14 @@ last three characters: gen :::::::::::::::::::::::::::::::::::::::: keypoints -- "Some functions to initialize matrices include `zeros`, `ones`, and `rand`. +- Some functions to initialize matrices include `zeros`, `ones`, and `rand`. They all produce a square matrix if only one argument is given, - but you can specify the dimensions you want separated by a comma, as in `zeros(rows,columns)`." -- "To select data points we use round brackets and provide the row and column indices of the elements we want. + but you can specify the dimensions you want separated by a comma, as in `zeros(rows,columns)`. +- To select data points we use round brackets and provide the row and column indices of the elements we want. They can be just numbers or arrays of numbers. E.g. `M(5,[3,4,5])`" -- "We can use the colon operator `:` to generate ordered arrays as `start:end` or `start:increment:end`." -- "We can use the keyword `end` to get the index of the last element." -- "The colon operator by itself `:` selects all the elements." +- We can use the colon operator `:` to generate ordered arrays as `start:end` or `start:increment:end`. +- We can use the keyword `end` to get the index of the last element. +- The colon operator by itself `:` selects all the elements. :::::::::::::::::::::::::::::::::::::::::::::::::: diff --git a/episodes/03-loading_data.md b/episodes/03-loading_data.md index 38d92488..d5b13dd6 100644 --- a/episodes/03-loading_data.md +++ b/episodes/03-loading_data.md @@ -6,14 +6,14 @@ exercises: 10 ::::::::::::::::::::::::::::::::::::::: objectives -- "Read data from a csv to be able to work with it in matlab." -- "Familiarize ourselves with our sample data." +- Read data from a csv to be able to work with it in matlab. +- Familiarize ourselves with our sample data. :::::::::::::::::::::::::::::::::::::::::::::::::: :::::::::::::::::::::::::::::::::::::::: questions -- "How can I load data to an array?" +- How can I load data to an array? :::::::::::::::::::::::::::::::::::::::::::::::::: @@ -451,9 +451,9 @@ so we'll learn to make some plots. :::::::::::::::::::::::::::::::::::::::: keypoints -- "Use `readmatrix` to read tabular CSV data into a program." -- "Use `mean`, `min`, `max`, and `std` on vectors to get the mean, minimum, maximum and standard deviation." -- "Use `mean(array,DIM)` to specify the dimension of your array in which to compute the mean." -- "For `min`, `max`, and `std`, the arguments need to be `(array,[],DIM)` instead." +- Use `readmatrix` to read tabular CSV data into a program. +- Use `mean`, `min`, `max`, and `std` on vectors to get the mean, minimum, maximum and standard deviation. +- Use `mean(array,DIM)` to specify the dimension of your array in which to compute the mean. +- For `min`, `max`, and `std`, the arguments need to be `(array,[],DIM)` instead. :::::::::::::::::::::::::::::::::::::::::::::::::: diff --git a/episodes/04-plotting.md b/episodes/04-plotting.md index bacf1c8e..39b806a9 100644 --- a/episodes/04-plotting.md +++ b/episodes/04-plotting.md @@ -6,15 +6,15 @@ exercises: 10 ::::::::::::::::::::::::::::::::::::::: objectives -- "Display simple graphs with appropriate titles and labels." -- "Get familiar with the functions `plot`, `heatmap` and `imagesc`." -- "Learn how to show images side by side." +- Display simple graphs with appropriate titles and labels. +- Get familiar with the functions `plot`, `heatmap` and `imagesc`. +- Learn how to show images side by side. :::::::::::::::::::::::::::::::::::::::::::::::::: :::::::::::::::::::::::::::::::::::::::: questions -- "How can I visualize my data?" +- How can I visualize my data? :::::::::::::::::::::::::::::::::::::::::::::::::: @@ -274,11 +274,11 @@ subjects of the next two lessons. :::::::::::::::::::::::::::::::::::::::: keypoints -- "Use `plot(vector)` to visualize data in the y axis with an index number in the x axis." -- "Use `plot(X,Y)` to specify values in both axes." -- "Document your plots with `title('My title')`, `xlabel('My horizontal label')` and `ylabel('My vertical label')`." -- "Use `hold on` and `hold off` to plot multiple lines at the same time." -- "Use `legend` and add `,DisplayName="legend name here"` inside the plot function to add a legend." -- "Use `tiledlayout(m,n)` to create a grid of `m` x `n` plots, and use `nexttile` to change the position of the next plot." +- Use `plot(vector)` to visualize data in the y axis with an index number in the x axis. +- Use `plot(X,Y)` to specify values in both axes. +- Document your plots with `title('My title')`, `xlabel('My horizontal label')` and `ylabel('My vertical label')`. +- Use `hold on` and `hold off` to plot multiple lines at the same time. +- Use `legend` and add `,DisplayName="legend name here"` inside the plot function to add a legend. +- Use `tiledlayout(m,n)` to create a grid of `m` x `n` plots, and use `nexttile` to change the position of the next plot. :::::::::::::::::::::::::::::::::::::::::::::::::: diff --git a/episodes/05-scripts.md b/episodes/05-scripts.md index 73f91764..0982a52b 100644 --- a/episodes/05-scripts.md +++ b/episodes/05-scripts.md @@ -6,14 +6,14 @@ exercises: 0 ::::::::::::::::::::::::::::::::::::::: objectives -- "Write and save MATLAB scripts." -- "Save MATLAB plots to disk." +- Write and save MATLAB scripts. +- Save MATLAB plots to disk. :::::::::::::::::::::::::::::::::::::::::::::::::: :::::::::::::::::::::::::::::::::::::::: questions -- "How can I save and re-use my programs?" +- How can I save and re-use my programs? :::::::::::::::::::::::::::::::::::::::::::::::::: @@ -383,7 +383,7 @@ which are then used to do something. So, can we create our own *functions*? :::::::::::::::::::::::::::::::::::::::: keypoints -- "Save MATLAB code in files with a `.m` suffix." +- Save MATLAB code in files with a `.m` suffix. - The set of commands in a script get executed by calling the script by its name, and all variables are saved to the workspace. Be careful, this potentially **replaces** variables. diff --git a/episodes/06-func.md b/episodes/06-func.md index e720d5be..695f1aec 100644 --- a/episodes/06-func.md +++ b/episodes/06-func.md @@ -6,17 +6,17 @@ exercises: 20 ::::::::::::::::::::::::::::::::::::::: objectives -- "Learn how to write a function" -- "Define a function that takes arguments." -- "Compare and contrast MATLAB function files with MATLAB scripts." -- "Recognize why we should divide programs into small, single-purpose functions." +- Learn how to write a function +- Define a function that takes arguments. +- Compare and contrast MATLAB function files with MATLAB scripts. +- Recognize why we should divide programs into small, single-purpose functions. :::::::::::::::::::::::::::::::::::::::::::::::::: :::::::::::::::::::::::::::::::::::::::: questions -- "How can I teach MATLAB to do new things?" -- "How can I make programs I write more reliable and re-usable?" +- How can I teach MATLAB to do new things? +- How can I make programs I write more reliable and re-usable? ::::::::::::::::::::::::::::::::::::::::::::::::::