Skip to main content


Coding for Medical Scientists

Module titleCoding for Medical Scientists
Module codeCSC2020
Academic year2022/3
Module staff

Dr Jon Brown (Convenor)

Dr Jonathan Witton (Convenor)

Duration: Term123
Duration: Weeks


Number students taking module (anticipated)


Description - summary of the module content

Module description

Analysing large complex data sets is increasingly common within biomedical science specialisms such as neuroscience. To extract meaningful information from such data sets, scientists often use computer programming languages to create bespoke analysis routines. For example, modern recording techniques allow neuroscientists to record the activity of hundreds of neurons at once and the only way to fully understand and integrate these complex data sets is to write specifically tailored computer code to extract relevant information. 

In this practical module, we will introduce you to Matlab, a programme commonly used across the medical sciences for carrying out analyses of complex data sets. Most of the contact time in this module will consist of computer lab workshops, where you will learn the fundamentals of writing Matlab code. Once you have grasped these underpinning skills, you will learn how to apply these to specific analytical problems in medical science. 

Importantly, we assume NO prior knowledge or skills in computer coding: we will be teaching these ‘from the ground up’. Matlab will be provided in the computer labs and is available to download free-of-charge for your personal computer. This is an optional module for BSc Neuroscience, Medical Sciences and Sport & Exercise Medical Sciences. It is not suitable for students who have already taken other university modules in computer coding. Admission from non CMH-degree programmes is at the discretion of the module lead.

Module aims - intentions of the module

The overall aim of this module is to develop some of the fundamental skills required to analyse and model complex data sets using a straightforward programming language. 

You will learn basic practical coding skills in a package commonly used in Medical Sciences: Matlab. 

To introduce some areas of biomedical research where computer coding-based analysis and modelling is required, we will focus on specific case studies in the following areas: 

  • Electrophysiology in neuroscience  

  • Image analysis and processing 

  • Computational modelling of cardiac action potentials 

Intended Learning Outcomes (ILOs)

ILO: Module-specific skills

On successfully completing the module you will be able to...

  • 1. Develop skills to write appropriate algorithms for the analysis of scientific data.
  • 2. Write efficient Matlab code for performing simple file management tasks.
  • 3. Write efficient Matlab code for the preliminary analysis of complex data sets.
  • 4. Justify and implement in Matlab some of the approaches used to analyse electrophysiological data.
  • 5. Demonstrate an understanding and implementation of key digital signal processing techniques as applied to electrophysiological data.
  • 6. Learn to write code to quantify and manipulate features of biomedical imaging data
  • 7. Demonstrate an awareness of, and an ability to implement, publicly available Matlab toolboxes generated by the wider scientific community.
  • 8. Describe some approaches for computational modelling of biological processes such as action potentials.
  • 9. Create simple mathematical models of biological processes such as action potentials.

ILO: Discipline-specific skills

On successfully completing the module you will be able to...

  • 10. Select and implement appropriate analytical processes for a given biomedical data set.
  • 11. Accurately present data in a graphical format.

ILO: Personal and key skills

On successfully completing the module you will be able to...

  • 12. Evaluate analytical problems and design algorithm-based solutions.
  • 13. Effectively use ‘help’ functions, internet resources, manuals and books to solve problems.
  • 14. Write clear data-driven reports on analysed data, including annotated code.

Syllabus plan

Syllabus plan

Whilst the module’s precise content may vary from year to year, an example of an overall structure is as follows:  

We will begin the module with an introduction to fundamental coding skills using Matlab. Later in the module we will introduce some biomedical data analysis and modelling problems which can be addressed using these programming skills. Each of these areas are explored to introduce different analytical and coding skills. 

Section 1Introduction to coding in general and Matlab  

Topics may include: Variable types; arrays and matrices; arithmetic in Matlab; indexing; built-in functions; plotting data; algorithms and pseudo-code; scripts and functions; annotating code with comments 

Section 2Electrophysiology  

Topics may include: sampling theory, measuring peaks; batch processing; filtering. 

Section 3Image analysis  

Topics may include: images as matrices; sampling theory; identifying regions of interest; measuring; averaging and filtering; images over time – movies 

Section 4Computational modelling of biology  

Topics may include: principles of computational modelling; using Matlab to simulate cardiac action potentials; creating simulations of cardiac tissue during healthy and diseased states. 

Learning and teaching

Learning activities and teaching methods (given in hours of study time)

Scheduled Learning and Teaching ActivitiesGuided independent studyPlacement / study abroad

Details of learning activities and teaching methods

CategoryHours of study timeDescription
Scheduled Learning & Teaching activities2Lectures (May be recorded)
Scheduled Learning & Teaching activities30Computer labs
Guided Independent Study4Lecture videos
Guided Independent Study6Lecture preparation
Guided independent study18Computer lab preparation and consolidation
Guided independent study60Coding projects, including report writing
Guided independent study15Revision
Revision15Wider reading


Formative assessment

Form of assessmentSize of the assessment (eg length / duration)ILOs assessedFeedback method
Data analysis coursework 11000 word equivalent + code1-3,10-14Written

Summative assessment (% of credit)

CourseworkWritten examsPractical exams

Details of summative assessment

Form of assessment% of creditSize of the assessment (eg length / duration)ILOs assessedFeedback method
Data analysis coursework 2 701500 word equivalent + code 1-7,10-14 Written
Practical ‘coding exam’ (open book) 302 hour + 30 min upload time 1-13Written


Details of re-assessment (where required by referral or deferral)

Original form of assessmentForm of re-assessmentILOs re-assessedTimescale for re-assessment
Data analysis coursework 2 (70%) Data analysis coursework 3 (1500 word equivalent + code )1-7,10-14Ref/Def period
Practical ‘coding exam’ (open book) (30%) Practical ‘coding exam’ (open book) (2 hour + 30 min upload time)1-13Ref/Def period

Re-assessment notes

If a student is referred in Coursework 2 they will be required to undertake a new equivalent assessment in the Ref/Def period. 

Please refer to the TQA section on Referral/Deferral:  


Indicative learning resources - Basic reading

  • Matlab: a practical introduction to programming and problem solving (2013) 3rd Ed. Stormy Attaway ISBN: 9780124058767 (available as an e-book from library)
  • MATLAB for neuroscientists : an introduction to scientific computing in MATLAB (2014) 2nd Ed. Wallisch et al. ISBN: 9780123838360 (available as an e-book from library)
  • Fundamentals of Digital Image Processing: a practical approach with examples in Matlab (2011). Chris Solomon, Toby Brecon. (available as e-Book)

Indicative learning resources - Web based and electronic resources

Matlab Style Guidelines 2.0:

Module has an active ELE page

Key words search

Neuroscience; data analysis; electrophysiology; imaging; computer programming; Matlab

Credit value15
Module ECTS


Module pre-requisites


Module co-requisites


NQF level (module)


Available as distance learning?


Origin date


Last revision date