Pyramid made of Marbles (plots and calculation)

It provides the number of needed marbles to build a pyramid and plots it
221 Downloads
Aktualisiert 21. Mär 2014

Lizenz anzeigen

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

Zitieren als

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. Abgerufen .

Kompatibilität der MATLAB-Version
Erstellt mit R2012a
Kompatibel mit allen Versionen
Plattform-Kompatibilität
Windows macOS Linux
Kategorien
Mehr zu Annotations finden Sie in Help Center und MATLAB Answers

Community Treasure Hunt

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

Start Hunting!
Version Veröffentlicht Versionshinweise
1.0.0.0