MATLAB Answers


How can I generate a user-input geometric series script?

Asked by Veronica george on 14 Nov 2013
Latest activity Answered by Walter Roberson
on 14 Nov 2013

I'm looking to generate a script that will be able to have user input. How do I start this code? That's my struggle: what exactly is a geometric progression in matlab? I'm looking for it to use two elements: a = 3 and r = 2.

I want the script to have the ability for users to add the size of the progression and determine how many numbers will be odd and even. User should be able to add in the values for a, r, and size.

If someone can push me in the right direction that'd be helpful.



No products are associated with this question.

1 Answer

Answer by Walter Roberson
on 14 Nov 2013

See input() and inputdlg()

Geometric progressions in MATLAB are the same as in regular mathematics.


Join the 15-year community celebration.

Play games and win prizes!

Learn more
Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!