Constructs the graph inhomogeneous Poisson matrix K (u -> div k grad u operator, generalization of graph Laplacian), with adjacency matrix A and nodal values of resistance k supplied by the user. Edge resistances are computed as the average resistance of the two nodes the edge connects.
A = sprandsym(100,10/100); % 100 nodes, about 10 edges per node
qq = 1 + rand(100,1); %Nodal resistance values
K = divkgradu_graph(A,qq); %Graph poisson operator
Nick Alger (2023). divkgradu_graph(A,qq) (https://www.mathworks.com/matlabcentral/fileexchange/48602-divkgradu_graph-a-qq), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform CompatibilityWindows macOS Linux
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!