Pyramid made of Marbles (plots and calculation)

It provides the number of needed marbles to build a pyramid and plots it
221 téléchargements
Mise à jour 21 mars 2014

Afficher la licence

This document provides the number of needed marbles to build a pyramid that has an n-number of marbles on one side.
It also plots the result pyramid
Examples that you can type to start:

N_of_Marbles (3);
Calculates how many marbles are needed for a 3-marble side. Result: (3 + 2 + 1) for the first floor + (2 + 1) for the second, plus the last floor (1) = 10
Plot_Marbles(5,300);
Plots the pyramid, with balls of relative size of 300
Plot_Evolution(5);
Plots the evolution of the number of needed marbles from 1 to 5

Written by Francesc Melia Sune

Citation pour cette source

Francesc Melia (2024). Pyramid made of Marbles (plots and calculation) (https://www.mathworks.com/matlabcentral/fileexchange/45975-pyramid-made-of-marbles-plots-and-calculation), MATLAB Central File Exchange. Récupéré le .

Compatibilité avec les versions de MATLAB
Créé avec R2012a
Compatible avec toutes les versions
Plateformes compatibles
Windows macOS Linux
Catégories
En savoir plus sur Annotations dans Help Center et MATLAB Answers

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Publié le Notes de version
1.0.0.0