Solving equation with increasing value by multiplication

Hello, I am trying to create a code to calculate the area of a triangle with a range of length. And these length number are twice the previous number. Basically, first is 2, then 4, 8, 16, 32, 64, 128. Its breadth stays the same.
Code.
a =[1:???:128]
for i=1:length(a)
y=a(i)*100/2
end
I appreciate all your help in advance.

Respuestas (2)

Categorías

Más información sobre Loops and Conditional Statements en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 16 de Mzo. de 2018

Respondida:

el 4 de Sept. de 2020

Community Treasure Hunt

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

Start Hunting!

Translated by