I don't understand the grouping task vector coding.
In test case 1, how can 4 be done before 3? Two rows of order_correct have 4 before 3.
If I am interpreting correctly, tests 1, 3, and 5 might be incorrectly defined. In test 1, job4 depends on job3 (dependencies(4,3)==1) so the solution [4 3 5 2 1] would not be correct. Similarly, in test 3, job1 depends on job2 so [4 3 1 5 2] would not seem correct, etc. Am I misinterpreting?
Return the largest number that is adjacent to a zero
We love vectorized solutions. Problem 1 : remove the row average.
BattleShip - Petty Officer (Level 2)
Bleed non-zeros to the right using REGEXP, and that sort of cheatcodess...
Create a random logical vector of N elements of which M are true.
Make a KITT-scanner on the command line
Wrap a vector, but insert NaN's at the wrap-positions.
Operate on matrices of unequal, yet similar, size
Find the treasures in MATLAB Central and discover how the community can help you!
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office