excuse could someone correct or modify this routine
이전 댓글 표시
X(1)=1;
For i=1:100
Disp(x)
X(i+1)=sin(x(i))
End
채택된 답변
추가 답변 (1개)
jose guevara
2018년 8월 1일
0 개 추천
댓글 수: 4
X(1)=1;
for i=1:100
X(i+1)=sin(x(i));
end
disp(x(100))
Walter Roberson
2018년 8월 1일
Note: the 100'th output is x(100), the way Dennis shows. But you also compute the 101'st output, which will be at x(101)
Dennis
2018년 8월 1일
I was thinking exactly the same and even edited it. Then i realised that we display x and not X.
Walter Roberson
2018년 8월 2일
Oh, good point. So it would be
X(1)=1;
for i=1:100
X(i+1)=sin(x(i));
end
disp(X(100))
or
disp(X(101))
카테고리
도움말 센터 및 File Exchange에서 Parallel Computing Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!