Beantwortet
Product of two graphs in MATLAB
Without weights, you can compute the graph product quite quickly: A1 = adjacency(G1); A2 = adjacency(G2); I1 = speye(...

etwa 9 Jahre vor | 3

| akzeptiert

Beantwortet
Select a node manually from a graph plot
Hi Alyssa, I'm not sure exactly what you are trying to do. The simplest thing would be to use the Data Cursor in your plot: C...

etwa 9 Jahre vor | 0

Beantwortet
All edges attached to given node in a (di)graph
There is currently no builtin for this, your lines with findedge are the simplest way to get the edge indices.

etwa 9 Jahre vor | 0

Beantwortet
Distances in a graph between two subset of nodes (Sources and Target)
Oh, great, now I understand the structure of the matrix. Sorry for the late answer. Here is how I would code this: R = zero...

etwa 9 Jahre vor | 1

Beantwortet
Distances in a graph between two subset of nodes (Sources and Target)
Probably the simplest way to do this would be to just compute all distances, and then use indexing into matrix D to get those di...

etwa 9 Jahre vor | 1

Beantwortet
Is it possible to display multiple edgelabels in a graph plot?
Here's an example of how to construct a custom label, using the new string class. With the older types char and cell array of ch...

mehr als 9 Jahre vor | 2

| akzeptiert

Beantwortet
how do I number the nodes of the graph from 0 to n-1 when i plot G?
Try plot(G, 'NodeLabel', 0:n-1)

mehr als 9 Jahre vor | 0

Beantwortet
get authority and hub scores from centrality function
The description is a bit misleading here: the 'hubs' and 'authorities' values for all nodes are both basically singular vectors ...

mehr als 9 Jahre vor | 0

| akzeptiert

Beantwortet
Connected graph given adjacency matrix
I realize this is an old question, but since it's still getting visits, I have a small addition. As of R2015b, the new graph and...

mehr als 9 Jahre vor | 5

Beantwortet
How do I classify networks by topology?
Sorry for picking this up months after the fact, I just happened on your question now. You can use the CONNCOMP command to ge...

mehr als 9 Jahre vor | 1

Beantwortet
Removing duplicate edges?
If your duplicates are always one that is A->B and another B->A, Alexandra's elegant solution will work very well. If you hav...

mehr als 9 Jahre vor | 3

Beantwortet
Performance problems with digraph structure
Generally speaking, it's much cheaper to construct a graph once, given all the nodes and edges, than incrementally using addnode...

mehr als 9 Jahre vor | 0

| akzeptiert

Beantwortet
Why the command "graphallshortestpaths" gives me Inf value for a weighted indirect graph that I know it doesn't have disconnections?
I'm not sure what function you are using to compute Dijkstra with a dense matrix - graphshortestpath for a dense matrix returns ...

mehr als 9 Jahre vor | 1

| akzeptiert

Beantwortet
opts.issym in eigs() - meaning
The options opts.issym and opts.isreal are only meant to be used when passing in a function handle for A. When a matrix A is ...

mehr als 9 Jahre vor | 2

| akzeptiert

Beantwortet
Plotting graph objects with curved edges and forced layout
You could try this: plot(G,'Layout','layered','Sources',1:5 ,'Sinks',6:10,'linewidth',LWidths); This will place all nodes ...

mehr als 9 Jahre vor | 0

| akzeptiert

Beantwortet
Different svd results with R2015b and R2016a
Both results are correct up to machine precision. The reason for the difference between MATLAB versions is that the MKL library ...

fast 10 Jahre vor | 0

| akzeptiert

Beantwortet
2 problem with new graph functions in Matlab 2015b
Sorry this is kind of a late answer. There is no function to compute the fundamental cut set from a minimum spanning tree in MAT...

etwa 10 Jahre vor | 1

Beantwortet
Adjacency matrix of a network to Distance matrix (Two -Hop)
An easier way to compute the two-hop matrix is through matrix multiplication, I think. The adjacency matrix A is the one-hop ...

etwa 10 Jahre vor | 0

Beantwortet
Using 'graph' for 3D representation.
You can get plot3 to show you the structure you're looking for as follows: >> xx = [x(s); x(t)] >> yy = [y(s); y(t)] ...

mehr als 10 Jahre vor | 0

Beantwortet
Solve system of matrices
I don't think this can be solved in general. The matrices X and Y contain 8 scalar unknowns together, but there are 12 scalar eq...

mehr als 10 Jahre vor | 0

| akzeptiert

Beantwortet
How can I increase the calculation speed in using eig()?
If you need all the eigenvalues and all the eigenvectors, there's not faster way than eig, I'm afraid. Here's an older thread ab...

mehr als 10 Jahre vor | 0

Beantwortet
Beginner: need help generating the right graph.
I'm afraid I don't quite understand the question. It sounds like you have a 150x88 matrix containing integers from 1 to 7, which...

mehr als 10 Jahre vor | 0

Beantwortet
How are coordinates in plot(graph(M)) generated?
There are different layout methods for plotting a graph, which you can call as follows: plot(graph(M), 'layout', LAY); w...

mehr als 10 Jahre vor | 1

| akzeptiert

Beantwortet
Eigs Performance SA vs. SM
The reason is that eigs uses very different algorithms for the two versions. Here's what each algorithm does |'lm':| This is ...

mehr als 10 Jahre vor | 1

| akzeptiert

Beantwortet
Solving linear equations with errors only on LHS
Your proposal of computing the total least squares solution of the problem seems good. The scaling of b is important here: if yo...

mehr als 10 Jahre vor | 2

| akzeptiert

Beantwortet
Read MATLAB graph objects into Python
I don't know much about python loadmat and h5py files, but I don't think loading the MATLAB object graph would realistically wor...

mehr als 10 Jahre vor | 0

Beantwortet
How to quickly fill in a matrix
Use spdiags: spdiags(repmat(phi([end:-1:1 1])', T), -10:0, T, T)

mehr als 10 Jahre vor | 0

Beantwortet
Dijkstra's algorithm problem
Since R2015b, MATLAB has a class graph which provides a function shortestpathtree that does this algorithm for you: >> g = ...

mehr als 10 Jahre vor | 0

Beantwortet
How to multiply 4D array.
You could try downloading the <http://www.sandia.gov/~tgkolda/TensorToolbox/index-2.6.html tensor toolbox> by Kolda and Bader, w...

mehr als 10 Jahre vor | 0

| akzeptiert