How do I avoid using for loops in the following problem?
조회 수: 1 (최근 30일)
이전 댓글 표시
B=[b1,b2,..,bn], C=[c1,c2,...,cn] , and D=[d1,d2,...,dn]|are known. A scalar |A(0) is also known. I need to calculate A(1)...A(n) using the following iteration: A(i)=max{ci,A(i-1)+bi}+di,i=1,...,n. Is there any method or function I can use to get A(1)...A(n) without using a for loop? Thank you in advance!
댓글 수: 0
답변 (1개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Big Data Processing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!