This piece of code in an implementation of the Mandelbrot set (https://en.wikipedia.org/wiki/Mandelbrot_set).
The whole idea is to compare the function implemented in the func_mandel.m
file with our implementation in
the C language (func_mandel_MEX.c
). If both are exactly the same, then the difference should be zero.
In order to run the code, execute the following commands:
- Create the MEX fucntion:
mex -R2018a func_mandel_MEX.c
. - Run the test:
mandel_test
.
This will produce an output similar to the one below:
Note: Some of the files used in this implementation were provided as part of the course "Using C with MATLAB"
taught at the University of Oulu, in 2022.