How to use non-unique node names in a digraph?
Instead of setting these inputs as node names, add them as a separate variable in the nodes table. Then, pass them to the plotti...

6 meses ago | 0

| accepted

Is there any way to accelerate the solving of a series of large sparse positive definite linear equations "Ax=b" with same "A" and different "b"?
If you are able to solve for one vector using A \ b, you could pass in a matrix containing all your right-hand sides in instead:...

6 meses ago | 2

Accelerate eigs with GPU
The eigs function is not supported on the GPU. There is support for sparse matrices on the GPU, since R2015a: Release notes para...

6 meses ago | 1

In terms of the adjacency matrix, a disconnected graph means that you can permute the rows and columns of this matrix in a way w...

6 meses ago | 0

Assigning values to an array of arbitrary dimensions in MATLAB.
Using the somewhat recent implicit expansion, this can also be done without indexing into every element of the array: function ...

6 meses ago | 0

How to find all edges indexes if node indexes are given?
So you're looking for all edges where both end nodes are part of the set 4, 5, 6? This will compute them: >> [s, t] = findedge(...

6 meses ago | 0

| accepted

Create random graph with limited degree
You could start by just making an undirected graph, and then go through each node and compute its degree. If the degree is large...

6 meses ago | 0

Solved

Maximum of ND-array
Find the maximum element of a N dimensional array. Example: A=[1 2 4 ; -20 4 10]; The maximum is 10.

6 meses ago

Result of A(:,:,1,1) coming as result of A(:,:,1,2)
The eigenvectors returned by EIG are returned in the same order as the eigenvalues, but the eigenvalues are not necessarily sort...

6 meses ago | 0

How to find all related nodes in directed graph?
Another option is to use the weak connected components of the graph: bins = conncomp(G, 'Type', 'weak'); % bins(nid) gives th...

7 meses ago | 0

rotation of graph node labels
The labels will be straight in most layouts (all but 'circle', 'layered'). You can first use 'circle' layout and then convert to...

7 meses ago | 0

| accepted

Error using matlab.graphics.chart.primitive.GraphPlot/highlight>checkSubgraph
Try using Gsol = graph(idxs(ledge,1),idxs(ledge,2), [], numnodes(G)); so that G and Gsol both have the same number of nodes. T...

7 meses ago | 0

| accepted

This was the case for old EIGS, it would use some random restart vectors that changed on every run. In the version of EIGS that ...

7 meses ago | 1

Assign Numerical Node Labels
For the first call, use >> GG.Nodes.Name = num2str(Name)' - GG.Nodes.Name has to be a column vector. For the second call,...

7 meses ago | 0

| accepted

How to find inverse of a 608*608 matrix fast?
The matrices in this file are symbolic, it's very expensive to compute with large arrays of these variables. If you cast it to f...

7 meses ago | 0

| accepted

Is it possible to recover *the* decomposition that's ultimately employed by mldivide (backslash)?
The same decomposition is used, the difference is in the estimation of the condition number. MA57 provides an estimate of the co...

7 meses ago | 3

"eig" use which algorithm to find eigenvalues
We don't give out the exact method used, but all syntaxes of EIG call into various LAPACK functions. See here for an introductio...

7 meses ago | 0

sortrows graph edges .
The variable G.Edges.EndNodes of a graph can't be modified, it is always sorted by the nodes in the graph. This is so that the p...

7 meses ago | 2

How to find all the downstream nodes from a node in a graph?
You can call nearest(G, 1, Inf) which will find all nodes reachable from node 1 in an infinite radius. This will contain only...

7 meses ago | 1

Find border edges of the graph
The graph class doesn't have any functions based on coordinates of the points - it just knows about their connections. Use conve...

8 meses ago | 1

| accepted

QR decomposition with the output of a permutation vector
The purpose of arranging all diagonal elements in descending order is to allow splitting R into two parts if A is low-rank or cl...

8 meses ago | 0

| accepted

How to add highlighted nodes and edges of a graph to the legend?
The problem here is that legend will only provide labels for what graphics recognizes as individual objects. So in a line plot,...

9 meses ago | 1

| accepted

How to restore tensor after applied the PARAFAC model?
The three component vectors represent the 3 different dimensions here. For the one-component case (all are vectors), you can use...

9 meses ago | 0

| accepted

Create a graph from removed edges
The graph constructor has a syntax that specifies the number of nodes of the graph: graph(s, t, [], numnodes) if you pass the ...

9 meses ago | 0

| accepted

SVD computation using eig function
Try the formula the other way around, using U_tilde, V_tilde and A to compute D: >> U_tilde'*A*V_tilde ans = 70.0118 -0....

9 meses ago | 0

| accepted

Using Singular value decomposition for feature extraction from images
Image compression using SVD is a pretty common example (although not the most efficient way to compress an image), here are some...

9 meses ago | 0

Error using eig Input matrix contains NaN or Inf.
The function sossolve is part of a third-party tool, this seems to be their website: http://www.cds.caltech.edu/sostools/. It's ...

9 meses ago | 0

How to keep track of order eigenvalue in eig or eigs?
The eigenvalues returned by EIG are not sorted in any particular order generally (for some special types of matrices (e.g. exact...

9 meses ago | 1