MatLab Workshop Part 1 In this workshop you will be using MatLab to process and present data sets. The data you will require can be downloaded from the files below,
and an example plot is shown below. Part 1 will introduce the basics of plotting in MatLab based on some acoustic data on lithium ion batteries, which you can read more about here: https://www.sciencedirect.com/science/article/pii/S0378775319313114 Tutorial Session 1 10 Time of Flight (us) ▼ PPT 9 7 3 2 1 0 0 Data for MatLab workshop f Acoustic 2D Second Plot.xlsx f Acoustic 2D.xlsx 2 G 1 4.4 MB Acoustic 3D Coursework.xlsx Acoustic 3D Example.xlsx QRM Workshop 2_JR.pptx A Statistics3.xlsx 50 Matlab introduction slides A PPTX Time (min) 100 150 128 112 96 80 64 48 32 16 0 Matlab Tutorial Some useful tutorial guides for plotting 2D and 3D data can be found at the following links: https://uk.mathworks.com/help/matlab/learn matlab/plots.html https://uk.mathworks.com/support/search.html/videos/using-basic-plotting- functions-69018.html?fq=asset type name:video%20category:matlab/2-and-3d- plots&page=1 Part 2 In this part we will look at more complicated uses of MatLab for extracting quantitative data from, for example, images Tutorial Session 2 In the live session, we will go through an example of using MatLab to analyse data from a battery safety test, where a nail penetration is used to study how a battery explodes with ultra-fast x-ray imaging. For this tutorial, you can follow along with the code included in the PowerPoint presentation below and with the data given here. After the tutorial, a similar example will be set for you to work on for the assessment part of the workshop. Please note, the videos of batteries exploding in the PowerPoint are hyperlinked. For this workshop and coursework, you will need to have the Signal Processing Toolbox installed, so that we can use the "findpeaks" function to analyse data. To do this, open Matlab and switch to the "Apps" tab. Click on "Get More Apps." Search for "Signal Processing Toolbox" and click on the search result. You should then be taken to the Toolbox page and can click to install from there. You might need to log in; !!! Signal Processing Toolbox install guide A PDF 349.2 KB 2.8 MB MatLab workshop 2 information pack A PPTX 129.5 MB MatLab workshop 2 example data XLSX Data for coursework assessment XLSX 12.6 MB MatLab Troubleshooting Questions Please post your questions related to MatLab here Mark as done Assessment For the assessment you are asked to produce 5 plots based on the material covered in the tutorials. You should submit graphs and codes (pasted as text - if you use the graphical interface 'property inspector', you need to export that code) in a single PDF for the following data sets. Details are given in the 'MatLab assessment' page below. Produce a .pdf containing all 5 figures (ideally good quality, i.e. high-resolution or a vector graphic) for submission MatLab Assessment details Produce the following 5 plots using the data sets uploaded in the MatLab tab 1. 2D lineplot showing two datasets on the same plot taken from 'acoustic 2d' and 'acoustic 2D second plot' data sets above. This plot should resemble the one on slide 13 of the accompanying powerpoint (but you should tailor the style to your tastes) 2. A 3D data plot using data from 'Acoustic 3D coursework' - the choice of how you display this 3D data is up to you. The plot should clearly articulate the underlying scientific results, as explained in the first section of the workshop, but there are several sensible ways to do this, and so the choice is yours. 3. A statistical analysis of a large data set, which then should be plotted as average of change in amplitude with time vs time of flight, including a method of dispersion of your choice, for data set 'statistics 3'. Again, the choice of how to represent the data, especially regarding the dispersion, is up to you. For this data set, include a one line justification of the measurement of the dispersion you decided to use. 4. Following the Matlab Subplot tutorial here you are required to investigate the impact of altering the time step on the images produced. You should produce 4 plots (one for each of x, y, z and xyz data), each of which shows 4 subplots for the four different time steps (all labelled on your plot). Please use time steps of π/2, 1/5, 1/20 and 1/1000. An example in the the image below is given for the X data set is shown. For these plots you are free to choose the style of plot which best suits the data and are encouraged to select an alternative colour scheme which enhances the visualisation of the plot. Please ensure all plots are labelled appropriately. For clarity, Plot 1: x data, 4 subplots of π/2, 1/5, π/20 and π/1000; plot 2: y data, 4 subplots of π/2, π/5, π/20 and π/1000; etc. 2- 0 2 0 2 AU 112 20 10 2 0 2 9 2003 1300 1000 500 115 T/1000 26 5. For the second MatLab tutorial you should submit a plot via the following steps: • Download the coursework data (Nail Penetration Coursework). Import the data into Matlab (you can use any method of your choice). • Plot a colour map of the data, taking care to label it clearly, choose appropriate axis limits and a suitable colour scale with a labelled colour bar (you can use any method of your choice to format the figure). • Find the locations of the data points that represent the trends shown at the end of the workshop slides (using the code covered in the workshop, or your own approach if you prefer). • Plot the data points you have found for both trends on top of the colour map. • Fit an appropriate model to the data points that you have found (using the code covered in the workshop, or your own approach if you prefer). • Plot the models for both trends on the same figure (that already contains the colour map and the data points), taking care to choose clear formatting for all the data shown, and add a legend. • In the submission document include the equation and coefficients for your chosen model and a justification (a sentence or two) for you chosen model (model = curve shape/equation). Produce a .pdf containing all 5 figures (ideally good quality, i.e. high-resolution or a vector graphic) for submission