Filter löschen
Filter löschen

How to iteratively increase the number of power operations

1 Ansicht (letzte 30 Tage)
patr chri
patr chri am 27 Jan. 2022
Beantwortet: David Hill am 27 Jan. 2022
Hello,
I want to write a loop in which I will iteratively increase the number of power operations I do.
For example:
Loop 1: x(1) = 2^(1/2)
Loop 2: x(2) = 2^(1/2)^(1/2)
Loop 3: x(3) = 2^(1/2)^(1/2)^(1/2)
... (and so on)
Is this possible to be done?

Akzeptierte Antwort

David Hill
David Hill am 27 Jan. 2022
n=10;%how many do you want
x=2.^((.5).^(1:n))

Weitere Antworten (0)

Kategorien

Mehr zu Loops and Conditional Statements finden Sie in Help Center und File Exchange

Produkte


Version

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by