====== Differences ====== This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | |||
gibson:teaching:spring-2016:math445:lab6 [2018/03/06 06:57] gibson |
gibson:teaching:spring-2016:math445:lab6 [2018/03/06 06:58] (current) gibson |
||
---|---|---|---|
Line 26: | Line 26: | ||
Compute the Google Page Rank for a network of 100 pages within ''www.unh.edu''. | Compute the Google Page Rank for a network of 100 pages within ''www.unh.edu''. | ||
- | **(a)** Down load the [[https://www.mathworks.com/matlabcentral/mlc-downloads/downloads/submissions/37976/versions/7/previews/surfer.m/index.html?access_key=|surfer.m]] | + | **(a)** Download the [[https://www.mathworks.com/matlabcentral/mlc-downloads/downloads/submissions/37976/versions/7/previews/surfer.m/index.html?access_key=|surfer.m]] Matlab script from [[http://www.mathworks.com/moler/chapters.html|Numerical Computing with Matlab]] by Clive Moler. Set ''M=100'' and run the command ''[w,L] = surfer('http://www.unh.edu',M);''. This might take a few minutes. |
- | from [[http://www.mathworks.com/moler/chapters.html|Numerical Computing with Matlab]] by Clive Moler. Set ''M=100'' and run the command ''[w,L] = surfer('http://www.unh.edu',M);''. This might take a few minutes. | + | |
**(b)** After some time this will generate a vector $w$ of websites and a matrix $L$ of links between them. All the entries of $L$ should be either 0 or 1. But $L$ will have 100^2 == 10,000 entries, so you can't check this by eye. Write a short piece of Matlab code that double-checks that all entries of $L$ are either 0 or 1. | **(b)** After some time this will generate a vector $w$ of websites and a matrix $L$ of links between them. All the entries of $L$ should be either 0 or 1. But $L$ will have 100^2 == 10,000 entries, so you can't check this by eye. Write a short piece of Matlab code that double-checks that all entries of $L$ are either 0 or 1. |