Cody

# Problem 2345. row-th maximum row elements

Solution 2073983

Submitted on 30 Dec 2019 by Asif Newaz
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

### Test Suite

Test Status Code Input and Output
1   Pass
x=[ 1 2 4; 4 5 5; 8 9 1];; y= [4 5 1]; assert(isequal(i_th_largest(x),y))

a = 4 y = 4 a = 5 5 y = 4 5 a = 9 8 1 y = 4 5 1

2   Pass
x=ones(1000,1000); y=ones(1,1000); assert(isequal(i_th_largest(x),y))

a = 1 y = 1 a = 1 1 y = 1 1 a = 1 1 1 y = 1 1 1 a = 1 1 1 1 y = 1 1 1 1 a = 1 1 1 1 1 y = 1 1 1 1 1 a = 1 1 1 1 1 1 y = 1 1 1 1 1 1 a = 1 1 1 1 1 1 1 y = 1 1 1 1 1 1 1 a = 1 1 1 1 1 1 1 1 y = 1 1 1 1 1 1 1 1 a = 1 1 1 1 1 1 1 1 1 y = 1 1 1 1 1 1 1 1 1 a = 1 1 1 1 1 1 1 1 1 1 y = 1 1 1 1 1 1 1 1 1 1 a = 1 1 1 1 1 1 1 1 1 1 1 y = 1 1 1 1 1 1 1 1 1 1 1 a = 1 1 1 1 1 1 1 1 1 1 1 1 y = 1 1 1 1 1 1 1 1 1 1 1 1 a = 1 1 1 1 1 1 1 1 1 1 1 1 1 y = 1 1 1 1 1 1 1 1 1 1 1 1 1 a = 1 1 1 1 1 1 1 1 1 1 1 1 1 1 y = 1 1 1 1 1 1 1 1 1 1 1 1 1 1 a = 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 y = 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 a = 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 y = 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 a = 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 y = 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 a = 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 y = 1 1 1 1 1 1 1 1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1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 y = 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 a = Columns 1 through 29 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 Column 30 1 y = Columns 1 through 29 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 Column 30 1 a = Columns 1 through 29 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 Columns 30 through 31 1 1 y = Columns 1 through 29 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 Columns 30 through 31 1 1 a = Columns 1 through 29 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 Columns 30 through 32 1 1 1 y = Columns 1 through 29 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 Columns 30 through 32 1 1 1 a = Columns 1 through 29 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 Columns 30 through 33 1 1 1 1 y = Columns 1 through 29 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 Columns 30 through 33 1 1 1 1 a = Columns 1 through 29 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 Columns 30 through 34 1 1 1 1 1 y = Columns 1 through 29 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 Columns 30 through 34 1 1 1 1 1 a = Columns 1 through 29 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 Columns 30 through 35 1 1 1 1 1 1 y = Columns 1 through 29 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 Columns 30 through 35 1 1 1 1 1 1 a = Columns 1 through 29 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 Columns 30 through 36 1 1 1 1 1 1 1 y = Columns 1 through 29 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 Columns 30 through 36 1 1 1 1 1 1 1 a = Columns 1 through 29 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 Columns 30 through 37 1 1 1 1 1 1 1 1 y = Columns 1 through 29 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 Columns 30 through 37 1 1 1 1 1 1 1 1 a = Columns 1 through 29 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

3   Pass
x=zeros(1000,1000); y=zeros(1,1000); assert(isequal(i_th_largest(x),y))

a = 0 y = 0 a = 0 0 y = 0 0 a = 0 0 0 y = 0 0 0 a = 0 0 0 0 y = 0 0 0 0 a = 0 0 0 0 0 y = 0 0 0 0 0 a = 0 0 0 0 0 0 y = 0 0 0 0 0 0 a = 0 0 0 0 0 0 0 y = 0 0 0 0 0 0 0 a = 0 0 0 0 0 0 0 0 y = 0 0 0 0 0 0 0 0 a = 0 0 0 0 0 0 0 0 0 y = 0 0 0 0 0 0 0 0 0 a = 0 0 0 0 0 0 0 0 0 0 y = 0 0 0 0 0 0 0 0 0 0 a = 0 0 0 0 0 0 0 0 0 0 0 y = 0 0 0 0 0 0 0 0 0 0 0 a = 0 0 0 0 0 0 0 0 0 0 0 0 y = 0 0 0 0 0 0 0 0 0 0 0 0 a = 0 0 0 0 0 0 0 0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0 0 0 0 0 0 0 0 0 0 0 0 a = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 y = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 a = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 y = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 a = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 y = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 a = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 y = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 a = Columns 1 through 29 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Column 30 0 y = Columns 1 through 29 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Column 30 0 a = Columns 1 through 29 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 30 through 31 0 0 y = Columns 1 through 29 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 30 through 31 0 0 a = Columns 1 through 29 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 30 through 32 0 0 0 y = Columns 1 through 29 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 30 through 32 0 0 0 a = Columns 1 through 29 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 30 through 33 0 0 0 0 y = Columns 1 through 29 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 30 through 33 0 0 0 0 a = Columns 1 through 29 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 30 through 34 0 0 0 0 0 y = Columns 1 through 29 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 30 through 34 0 0 0 0 0 a = Columns 1 through 29 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 30 through 35 0 0 0 0 0 0 y = Columns 1 through 29 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 30 through 35 0 0 0 0 0 0 a = Columns 1 through 29 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 30 through 36 0 0 0 0 0 0 0 y = Columns 1 through 29 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 30 through 36 0 0 0 0 0 0 0 a = Columns 1 through 29 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 30 through 37 0 0 0 0 0 0 0 0 y = Columns 1 through 29 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 30 through 37 0 0 0 0 0 0 0 0 a = Columns 1 through 29 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...

4   Pass
x=eye(1000); y=[1 zeros(1,999)]; assert(isequal(i_th_largest(x),y))

a = 1 y = 1 a = 1 0 y = 1 0 a = 1 0 0 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 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 30 through 31 0 0 y = Columns 1 through 29 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 30 through 31 0 0 a = Columns 1 through 29 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 30 through 32 0 0 0 y = Columns 1 through 29 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 30 through 32 0 0 0 a = Columns 1 through 29 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 30 through 33 0 0 0 0 y = Columns 1 through 29 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 30 through 33 0 0 0 0 a = Columns 1 through 29 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 30 through 34 0 0 0 0 0 y = Columns 1 through 29 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 30 through 34 0 0 0 0 0 a = Columns 1 through 29 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 30 through 35 0 0 0 0 0 0 y = Columns 1 through 29 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 30 through 35 0 0 0 0 0 0 a = Columns 1 through 29 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 30 through 36 0 0 0 0 0 0 0 y = Columns 1 through 29 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 30 through 36 0 0 0 0 0 0 0 a = Columns 1 through 29 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 30 through 37 0 0 0 0 0 0 0 0 y = Columns 1 through 29 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 30 through 37 0 0 0 0 0 0 0 0 a = Columns 1 through 29 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...

5   Pass
x=[ 1 1 3 4; 2 5 5 7; 8 8 8 8; 1 0 0 1]; y= [4 5 8 0]; assert(isequal(i_th_largest(x),y))

a = 4 y = 4 a = 7 5 y = 4 5 a = 8 8 8 y = 4 5 8 a = 1 1 0 0 y = 4 5 8 0

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!