Code covered by the BSD License
-
bigscreen(arg)
BIGSCREEN Set graphics properties for large audiences.
-
bizcard
BIZCARD Future version of The MathWorks business card.
-
blackjack(N)
BLACKJACK. Use random numbers in Monte Carlo simulation.
-
brownian.m
BROWNIAN Two-dimensional random walk.
-
censusgui(callbackarg)
CENSUSGUI Try to predict the US population in the year 2010.
-
circlegen(h)
CIRCLEGEN Generate approximate circles.
-
eigsvdgui(A,job)
EIGSVDGUI Demonstrate computation of matrix eigenvalues and singular values.
-
fern
FERN MATLAB implementation of the Fractal Fern
-
fftgui(y)
FFTGUI Demonstration of Finite Fourier Transform.
-
fftmatrix(varargin)
FFTMATRIX Plot columns of the Finite Fourier Transform matrix.
-
finitefern(varargin)
FINITEFERN MATLAB implementation of the Fractal Fern.
-
flame
FLAME A stiff ordinary differential equation.
-
floatgui(callbackarg)
FLOATGUI Show structure of floating point numbers.
-
fzerogui(F,ab,varargin)
FZEROGUI Demonstrate the zero finding algorithm used by FZERO.
-
greetings(phi)
GREETINGS Seasonal holiday fractal.
-
imagesvd(varargin)
IMAGESVD Principle component analysis of monochrome and color images.
-
interp2dgui(arg1,arg2)
INTERPGUI Behavior of periodic parametric curves.
-
interpgui(arg1,arg2)
INTERPGUI Behavior of interpolating functions.
-
lorenzgui
LORENZGUI Plot the orbit around the Lorenz chaotic attractor.
-
lugui(A,pivotstrat)
LUGUI Gaussian elimination demonstration.
-
ncmgui
NCMGUI Master GUI for Numerical Computing with MATLAB.
-
pdegui(action)
PDEGUI Demonstrate solution of model partial differential equations.
-
pennymelt(delta)
PENNYMELT Heat a penny.
-
pivotgolf(course,pivotstrat)
PIVOTGOLF Pivot Pickin' Golf.
-
primespiral(n,c)
PRIMESPIRAL Ulam's prime number spiral.
-
quadgui(F,a,b,tol,varargin)
QUADGUI Demonstrate numerical evaluation of a definite integral.
-
randgui(randfun)
RANDGUI Monte Carlo computation of pi.
-
randncond.m
RANDNCOND Condition of random matrices
-
rungeinterp(arg)
RUNGEINTERP Runge's polynomial interpolation example.
-
stegano(p,q)
STEGANO Investigate steganography in the default image.
-
swinger(x,y,orbitval)
SWINGER Classic double pendulum.
-
threenplus1(n)
-
touchtone(arg)
TOUCHTONE Use FFT to synthesize and analyze telephone dialing
-
walker
WALKER Human gait.
-
waves
WAVES Wave equation in one and two space dimensions.
-
bslashtx(A,b)
BSLASHTX Solve linear system (backslash)
-
crypto97(x)
CRYPTO97 Cryptography example.
-
digraph(file)
DIGRAPH Generate and analyze text digraph frequency matrix.
-
encrypt(filein,fileout)
ENCRYPT Apply the CRYPTO function to a text file.
-
ffttx(x)
FFTTX Textbook Fast Finite Fourier Transform.
-
fibnum(n)
FIBNUM Fibonacci number.
-
fibonacci(n)
FIBONACCI Fibonacci sequence
-
fmintx(F,a,b,tol,varargin)
FMINTX Textbook version of FMINBND
-
fzerotx(F,ab,varargin)
FZEROTX Textbook version of FZERO.
-
goldfract(n)
GOLDFRACT Golden ratio continued fraction.
-
golub(n)
GOLUB Badly conditioned integer test matrices.
-
inregion(x,y,xv,yv)
INREGION True for points inside or on a polygonal region.
-
lutx(A)
LUTX Triangular factorization, textbook version
-
membranetx(k,m,n,np)
MEMBRANETX Textbook version of MEMBRANE, eigenfunctions of L-membrane.
-
ode23tx(F,tspan,y0,arg4,varar...
ODE23TX Solve non-stiff differential equations. Textbook version of ODE23.
-
pagerank(U,G,p)
PAGERANK Google's PageRank
-
pagerankpow(G)
PAGERANKPOW PageRank by power method with no matrix operations.
-
pchiptx(x,y,u)
PCHIPTX Textbook piecewise cubic Hermite interpolation.
-
piecelin(x,y,u)
PIECELIN Piecewise linear interpolation.
-
polyinterp(x,y,u)
POLYINTERP Polynomial interpolation.
-
powersin(x)
-
qrsteps(A,b)
QRSTEPS Orthogonal-triangular decomposition.
-
quadtx(F,a,b,tol,varargin)
QUADTX Evaluate definite integral numerically.
-
randmcg(p,q)
RANDMCG Multiplicative congruential uniform random number generator.
-
randntx(varargin)
RANDNTX Text book version of RANDN
-
randssp(p,q)
RANDSSP Multiplicative congruential uniform random number generator.
-
randtx(arg1,arg2)
RANDTX Text book version of RAND
-
splinetx(x,y,u)
SPLINETX Textbook spline function.
-
surfer(root,n)
SURFER Create the adjacency graph of a portion of the Web.
-
tridisolve(a,b,c,d)
TRIDISOLVE Solve tridiagonal system of equations.
-
vandal(n)
VANDAL Symbolic Vandermonde matrix.
-
Contents.m
-
goldrect.m
-
sunspotstx.m
-
View all files
|
|
| pagerankpow(G)
|
function [x,cnt] = pagerankpow(G)
% PAGERANKPOW PageRank by power method with no matrix operations.
% x = pagerankpow(G) is the PageRank of the graph G.
% [x,cnt] = pagerankpow(G) also counts the number of iterations.
% There are no matrix operations. Only the link structure
% of G is used with the power method.
% Link structure
[n,n] = size(G);
for j = 1:n
L{j} = find(G(:,j));
c(j) = length(L{j});
end
% Power method
p = .85;
delta = (1-p)/n;
x = ones(n,1)/n;
z = zeros(n,1);
cnt = 0;
while max(abs(x-z)) > .0001
z = x;
x = zeros(n,1);
for j = 1:n
if c(j) == 0
x = x + z(j)/n;
else
x(L{j}) = x(L{j}) + z(j)/c(j);
end
end
x = p*x + delta;
cnt = cnt+1;
end
|
|
Contact us at files@mathworks.com