Effacer les filtres
Effacer les filtres

plotting a tower power of square root of 2

1 vue (au cours des 30 derniers jours)
Amjad Green
Amjad Green le 6 Nov 2018
Réponse apportée : KSSV le 6 Nov 2018
hello i am plotting the convergence of some tower powers,i have written the following code:
x=2^0.5;
g=x;
for (i=0:24)
g=x^g;
plot(i,g,'*')
hold on
end
i don't know why but i am only getting the points(*) without the line connecting the points,this infinite power tower converges to 2,i want to draw the line connecting the points.

Réponses (1)

KSSV
KSSV le 6 Nov 2018
x=2^0.5;
g=x;
i = 0:24 ;
g = zeros(length(i),1) ;
g(1) = x^g(1) ;
for (i=2:25)
g(i)=x^g(i-1);
end
i = 0:24 ;
plot(i,g)

Catégories

En savoir plus sur Scatter Plots dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by