필터 지우기
필터 지우기

How to iteratively increase the number of power operations

조회 수: 1 (최근 30일)
patr chri
patr chri 2022년 1월 27일
답변: David Hill 2022년 1월 27일
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?

채택된 답변

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by