How to ensure that values between ones is less than or equal to specific number?
조회 수: 2 (최근 30일)
이전 댓글 표시
I have these row vectors:
T = 1:11
C = T(1)
a = T(2:6)
b = T(7:11)
Da = [10 12 8 10 7]; % these vaules are corresponding to a values
Db = [10 9 8 10 7]; % theses vales are corresponding to b vales.
TD = 40
r = [1 2 3 7 8 1 4 8 9 1 5 6 10 11 1]; % r is a random permutation vector/ matrix consists of a and b values( a should always be followed by b in sequenc) after inserting ones which is C.
How to create a loop to ensure that the Da valuse, which are corresponding to a values, are less than or equel to TD(40) between each ones.
Same for Db, which are corresponding to b values, they also should be less or equel to TD(40) between each ones.
댓글 수: 0
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!