Subtracting elements with constraints
이전 댓글 표시
Hi all,
I have an array A and I need to subtract the elements of each column using the cumsum function:
B=bsxfun(@minus, A(1,:), cumsum(A(2:end,:)));
However I have some constraints that should not violated (min=1.3, max=11.7) Is there any way to do the calculations within these limits?
thanks
댓글 수: 3
Walter Roberson
2017년 2월 27일
What should happen if it goes outside that range? And since the items might be positive or negative, it could potentially go back into the range again.
Nikolas Spiliopoulos
2017년 2월 27일
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Matrix Indexing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!