Neurocomputing: Fundamentals of Computational Neuroscience
Tutorial 1
1. Basic matrix calculus
Given are the following matrices. Calculate the following qunatities by hand.
( 
3 
2 
4 
) 

A = 
4 
2 
2 

2 
6 
1 
( 
2 
4 
3 
) 

B = 
1 
2 
1 

3 
4 
2 
a) Matrix product: What is the product of these two matrices?
A * B = ?
b) Product of matrix with vector: x is a column vector x=(1 2 3)’. Note that the transpose operator, ‘ , transforms a row vector into a column vector and visa versa. Calculate the unknown vector y of the following equation:
y^{ }= A * x
c) Matrix inverse, solving a linear equation system: x is a column vector x=(8 3 5)’Calculate the unknown vector y^{ }of the following equation:
B* y^{ }= x
2. Basic Matlab
Start a Matlab session by typing matlab on unix systems or choosing the Matlab icon on window systems.
a) Write a program to add the numbers from 1 to N using a loop
b) Write a function that takes N as a parameter and returns the sum of the numbers 1 to N?
c) Test your answers of question 1 with Matlab.
d) Write a funtion that takes a the size of a square matrix and returns the product of two random matrices. Implement this function with nested loops and with matrix notation and measure the execution time of both functions with single parameter N which is the size of two random marices two matrices and mutiplys them tic ... toc.
3. Simple pattern recognition
In the file pattern1 are data that represent letters of the alphabet (AZ; blocks of 12 rows represent one character).
Write a short (!) program in MATLAB that can recognize these patterns. Your method should include some robustness so that noisy versions of the pattern can be recognized. A noisy version is an example of a pattern in which some of the entries have been changed. For example, you could choose 10% of pattern bits and change a 0 to a 1 and a 1 to a 0.