i would like to get all values of for loop outside loop,but this program gives me the last value only

2 visualizaciones (últimos 30 días)
for i=1:5
x(i)=i+1;
end
disp(x(i));

Respuesta aceptada

Walter Roberson
Walter Roberson el 4 de Jul. de 2015
disp(x);

Más respuestas (0)

Categorías

Más información sobre Entering Commands en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by