You are now following this Submission
- You will see updates in your followed content feed
- You may receive emails, depending on your communication preferences
the code is set and you just have to run the script, nothing else.
to get a fractal for some different function, one have to make the following changes:
- function 'f' and the first derivative 'f1' of the function.
- note that we are dealing with martix input, therefore, it is necessary to use element wise multiplication, division and exponenciation (.* ./ and .^), instead of regular multiplication, division and exponenciation (* / and ^)
- the information of roots must be updated, and assigned to r1, r2, ... so on.
- the logical matrices must set accordingly, each for a root and one in negation of each logical matrix (see script).
- the colour-map must be updated and the number of colours will be one greater than the number of roots, obviously one extra colour for divergence (black usually [0 0 0]).
- update the Z matrix which is the sum of every logical matrix multiplied by the row number of the colour-map, to assign a colour to it.
in the file, some lines are commented (starting with a % sign) to show how to make the aforementioned changes. now you have it and i'll ask you to go wild with it
Cite As
Owais Ali (2026). Newton Fractal - Basin of Attraction (https://www.mathworks.com/matlabcentral/fileexchange/109940-newton-fractal-basin-of-attraction), MATLAB Central File Exchange. Retrieved .
General Information
- Version 1.0.0 (1.64 KB)
MATLAB Release Compatibility
- Compatible with any release
Platform Compatibility
- Windows
- macOS
- Linux
| Version | Published | Release Notes | Action |
|---|---|---|---|
| 1.0.0 |
