이전 댓글 표시
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
Walter Roberson
2020년 10월 25일
? Code 3 is the same as Code 2 and produces the same result.
Elias Hassan Rezai
2020년 10월 25일
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Programming에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!