collatz
Version 1.0.1 (19,7 ko) par
Edgar Guevara
Checks for the Collatz conjecture for a given number
This function checks for the Collatz conjecture for a given number.
It can be customized to check other variants different to 3n+1
Takes a number n. If it’s even, divide by 2. If it’s odd, multiply by 3 and add 1. Repeat. Do all starting numbers lead to 1?
Citation pour cette source
Edgar Guevara (2024). collatz (https://github.com/guevaracodina/collatz), GitHub. Récupéré le .
Compatibilité avec les versions de MATLAB
Créé avec
R2017b
Compatible avec toutes les versions
Plateformes compatibles
Windows macOS LinuxCatégories
- MATLAB > Programming > Functions > Variables >
En savoir plus sur Variables dans Help Center et MATLAB Answers
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Découvrir Live Editor
Créez des scripts avec du code, des résultats et du texte formaté dans un même document exécutable.
Les versions qui utilisent la branche GitHub par défaut ne peuvent pas être téléchargées
Version | Publié le | Notes de version | |
---|---|---|---|
1.0.1 | updated logo |
|
|
1.0.0 |
|
Pour consulter ou signaler des problèmes liés à ce module complémentaire GitHub, accédez au dépôt GitHub.
Pour consulter ou signaler des problèmes liés à ce module complémentaire GitHub, accédez au dépôt GitHub.