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!