order 20 highest values of a pagerank vector

1 view (last 30 days)
So one more question, i have the pagerank vector of a matrix(=x). The vector has 1899 values.
I want to make matrix or a table with the 20 highest values of x and the nodes of the values.
I use M = maxk(x,20) to find them but i dont know how to create a table with the values and their position(aka node) in the vector.

Answers (2)

Andrei Bobrov
Andrei Bobrov on 16 Jan 2019
Edited: Andrei Bobrov on 16 Jan 2019
[M,position] = maxk(x,20);

Jan
Jan on 16 Jan 2019
Edited: Jan on 16 Jan 2019
Use the 2nd output of maxk also:
[M, index] = maxk(pagerank, 20)
Result = x(index, :)
I assume, you want maxk of the pagerank vector, not of the matrix x. Is this true?
I do not think, that this solves "create a table with the values and their position", but it is not clear to me, what you exactly want.

Categories

Find more on MATLAB Report Generator 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!