homework.md 1.61 KB
Newer Older
Laurent Heirendt's avatar
Laurent Heirendt committed
1
## Homework
Sylvain Arreckx's avatar
Sylvain Arreckx committed
2

Laurent Heirendt's avatar
Laurent Heirendt committed
3
Ideally, do this exercise on a computer on which `Matlab` or `octave` **are** installed.
Sylvain Arreckx's avatar
Sylvain Arreckx committed
4

Laurent Heirendt's avatar
Laurent Heirendt committed
5
<div class="fragment">
Laurent Heirendt's avatar
Laurent Heirendt committed
6
<br>
Laurent Heirendt's avatar
Laurent Heirendt committed
7
More information on how install these software are on [mathworks.com](www.mathworks.com]) or on [gnu.org/software/octave](gnu.org/software/octave)
Sylvain Arreckx's avatar
Sylvain Arreckx committed
8

Laurent Heirendt's avatar
Laurent Heirendt committed
9
<div class="fragment">
Laurent Heirendt's avatar
Laurent Heirendt committed
10
<br>
Laurent Heirendt's avatar
Laurent Heirendt committed
11
12
13
14
15
Don't forget to properly configure `git` with your username and email as explained in the training slides.


## Detailed instructions

Laurent Heirendt's avatar
Laurent Heirendt committed
16
- First, fork the [https://git-r3lab.uni.lu/R3school/git.practice](https://git-r3lab.uni.lu/R3school/git.practice) repository.
Sylvain Arreckx's avatar
Sylvain Arreckx committed
17

Laurent Heirendt's avatar
Laurent Heirendt committed
18
- Create the new branch `homework_myName`.
Sylvain Arreckx's avatar
Sylvain Arreckx committed
19

Laurent Heirendt's avatar
Laurent Heirendt committed
20
- Implement a new function (create a new file `sqrt_myName.m` in a new folder `src/thirdCommit`) called `sqrt_myName(x)` that computes the square root of `x`.
Sylvain Arreckx's avatar
Sylvain Arreckx committed
21

Laurent Heirendt's avatar
Laurent Heirendt committed
22
- Rename the `test.m` file in the `test/suite` directory to `test_myName.m`.
Laurent Heirendt's avatar
Laurent Heirendt committed
23
24

- Edit the file `test.m` and change the names of the functions accordingly.
Sylvain Arreckx's avatar
Sylvain Arreckx committed
25
26
27


- Before submitting the merge request, verify locally that your code is running properly.
28
29
30
31
32

  To do so, open the MATLAB application and type `matlabroot`. This will return the path to the MATLAB application. Note or copy this path and exit MATLAB. 
  NOTE: Do not copy the apostrophes, as they just denote the returned string.

  Open the Terminal and execute the following command:
Sylvain Arreckx's avatar
Sylvain Arreckx committed
33
   ```sh
34
   $ matlabroot/bin/matlab -nodesktop -nosplash < test_testAll.m
Sylvain Arreckx's avatar
Sylvain Arreckx committed
35
36
   ```
   and verify that no error is reported.
37
   NOTE: `matlabroot`in the terminal window refers to the copied path from the previous instruction.
Sylvain Arreckx's avatar
Sylvain Arreckx committed
38
39
40

- Create a merge-request.

Laurent Heirendt's avatar
Laurent Heirendt committed
41
- Assign @laurent.heirendt and your merge-request will be reviewed.
Sylvain Arreckx's avatar
Sylvain Arreckx committed
42

Laurent Heirendt's avatar
Laurent Heirendt committed
43
<br>
Sylvain Arreckx's avatar
Sylvain Arreckx committed
44
That's it!