jackmoody11 / collatz

Matlab script to visualize collatz conjecture

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Collatz

This is a Matlab script to visualize the Collatz conjecture. To use, save the file and enter collatz(n), replacing n to see a graph of how many steps it takes to get back to 1 for each number from 1 to n.

Here is an example of using the collatz() function in Octave: collatz(1000) result

Octave is a nice online platform that provides much of the functionality that Matlab does and can be found at https://octave-online.net/.

About

Matlab script to visualize collatz conjecture

License:MIT License


Languages

Language:MATLAB 100.0%