-
Daniel Duarte authoredDaniel Duarte authored
Homework
Ideally, do this exercise on a computer on which Matlab
or octave
are installed.
More information on how install these software are on mathworks.com or on gnu.org/software/octave
Don't forget to properly configure `git` with your username and email as explained in the training slides.
Detailed instructions
-
First, fork the https://git-r3lab.uni.lu/R3school/git.practice repository.
-
Create the new branch
homework_myName
. -
Implement a new function (create a new file
sqrt_myName.m
in a new foldersrc/thirdCommit
) calledsqrt_myName(x)
that computes the square root ofx
. -
Rename the
test.m
file in thetest/suite
directory totest_myName.m
. -
Edit the file
test.m
and change the names of the functions accordingly. -
Before submitting the merge request, verify locally that your code is running properly.
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:
$ matlabroot/bin/matlab -nodesktop -nosplash < test_testAll.m
and verify that no error is reported. NOTE:
matlabroot
in the terminal window refers to the copied path from the previous instruction. -
Create a merge-request.
-
Assign @laurent.heirendt and your merge-request will be reviewed.
That's it!