sums with for loop
조회 수: 3 (최근 30일)
이전 댓글 표시
I am beginner in matlab, and i struggly to resolve some exercice. can I have some advice according to this task?
1-1/3+1/5-1/7+1/9-..-1/1003
댓글 수: 0
채택된 답변
David Hill
2022년 10월 29일
n=1:502;
s=sum((-1).^(n+1)./(2*n-1))
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Function Creation에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!