How to ensure that values between ones is less than or equal to specific number?
2 views (last 30 days)
Show older comments
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 Comments
Answers (0)
See Also
Categories
Find more on Creating and Concatenating Matrices in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!