Mostrar comentarios más antiguos
can someboduy tell me wqhat is does these three kind of code mean? I mean why code3 is not working and what dows a( r ) actually mean? hwo does these change the layout? by rthe way this is not a homework but only my own thought :)
CODE1)
a=[0 1];
for r=3:100
a(r)=(r-1)+(r-2);
end
disp(a)
CODE2)
a=[0 1];
for r=3:100
a(r)=a(r-1)+a(r-2);
end
disp(a)
CODE3)
a=[0 1];
for r=3:100
a(r)=a(r-1)+a(r-2);
end
disp(a)
2 comentarios
Walter Roberson
el 25 de Oct. de 2020
? Code 3 is the same as Code 2 and produces the same result.
Elias Hassan Rezai
el 25 de Oct. de 2020
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Programming en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!