Respondida
eig() gives a negative eigenvalue for a positive semi-definite matrix
While A*A' is mathematically symmetric positive semi-definite, its numeric representation will not be - it's more like A*A' + (r...

más de 8 años hace | 3

Respondida
How does the eig function calculate its values?
Could you tell us what your results are? Eigenvectors are not uniquely defined, so it's possible for them to look quite differen...

más de 8 años hace | 1

Respondida
Why my matlab does not take "graph" in command window? is there something missing in my matlab?
The graph feature has been shipping since release R2015b. Maybe you have an earlier release? Try entering >> g = graph(1,...

más de 8 años hace | 1

| aceptada

Respondida
COND for homogeneous equations?
That's an interesting question, I'm not sure what the right way to do this is. In a first step, the matrix condition number desc...

más de 8 años hace | 2

Respondida
Index exceeds matrix dimensions error
With index out of bounds errors, in can be useful to do the following: >> dbstop on error >> ... run your code ... When...

más de 8 años hace | 0

Respondida
eigenvector centrality vs pagerank
It's possible to define eigenvector centrality for directed graphs, but it's rarely done, because in most cases the output is no...

casi 9 años hace | 2

| aceptada

Respondida
Is it possible to speed-up solving Ax=b for multiple b's by pre-computing the Cholesky factorization of A?
The main reason the first call is slower is that |R = chol(A)| for a sparse matrix tends to have a large amount of fill-in (that...

casi 9 años hace | 5

| aceptada

Respondida
Approximation of 3D points with a 3D curve (path smoothing)
You could try the <https://www.mathworks.com/help/matlab/ref/smoothdata.html smoothdata> function, which would just smooth the x...

casi 9 años hace | 0

Respondida
eigs() runs faster for more eigenvalues of the same matrix
The reason is that the "search space" used in each iteration is determined based on the number of eigenvalues requested. By incr...

casi 9 años hace | 3

| aceptada

Respondida
incosistent matrix multiplication and probelm with covarince matrix
A way to avoid computing negative eigenvalues is to work only on a part of the matrix: S2 = J*sqrt(C); %implicitly, S = S2...

casi 9 años hace | 1

Respondida
Edge Clutter Reduction in a Graph
I'm afraid there is currently no option for MATLAB's graph plot to do edge bundling.

casi 9 años hace | 0

Respondida
Why are my eigenvalues complex? (eig)
The eigenvalues of a real matrix are only real if the matrix is symmetric. The matrix C is not symmetric, therefore the eigenval...

casi 9 años hace | 0

Respondida
What's the truncation error in SVD?
Use |dsp = norm(ds(n+1:end)) / norm(ds)| instead of the sum. This is because in |norm(U*S*V', 'fro')|, you can move U and V o...

casi 9 años hace | 0

Respondida
Are there any codes to generate planar graphs in matlab or are there any large collections of planar graphs in matlab?
Can you give some more context on what kinds of planar graphs you are looking for? Are you trying to test an algorithm, maybe? ...

casi 9 años hace | 0

Respondida
Are there any codes to generate planar graphs in matlab or are there any large collections of planar graphs in matlab?
This is definitely the simplest way of generating random planar graphs in MATLAB, and should be reasonably quick (Delaunay trian...

casi 9 años hace | 0

Respondida
Are there matlab codes to compute cycle spaces of graphs?
There is no direct method to compute this in MATLAB's graph classes. From reading the wiki page, it seems that the following wil...

casi 9 años hace | 2

Respondida
Error with eigenvalues of unitary matrix
As mentioned in the comments above, if you are intending to compute all eigenvalues, it's best to call EIG, not EIGS. In fact, e...

casi 9 años hace | 2

| aceptada

Respondida
How to convert graph to digraph?
I'm afraid it's not possible to have both directed and undirected edges in the same graph. To convert a graph to a digraph, you ...

casi 9 años hace | 0

| aceptada

Respondida
Help with graphs - breadth search
This should be possible using the digraph object. Since you are modifying the graph, it may be best to write a for-loop that wil...

casi 9 años hace | 0

Respondida
computing SVD of very large matrix
The simplest way may be to use a computer with more memory - a matrix of size 1100000 x 1100 takes about 9GB of memory, which is...

casi 9 años hace | 1

Respondida
finding paths in a graph
I'm afraid I don't completely understand your question. In the strictest sense, what you describe is already done by dfsearch. H...

alrededor de 9 años hace | 0

Respondida
Null is misbehaving if used within loops.
Try using null(Z) instead of null(Z, 'r') With the 'r' option, no tolerance for round-off errors in the matrix Z ...

alrededor de 9 años hace | 1

Respondida
Sparse Matrix build efficiency
i) You should expect constructing a sparse matrix in a loop by adding elements using indexing A(i, j) = s to be slower than cons...

alrededor de 9 años hace | 0

Respondida
bdschur algorithm in Matlab
According to the file bdschur.m, this uses LAPACK's DTRSYL and SLICOT's MB03RD functions. See >> edit bdschur

alrededor de 9 años hace | 0

| aceptada

Respondida
Overloading arithmetic on graphs or digraphs
I'm afraid methods for MATLAB's digraph class can't be overloaded. There is still a way to get what you want, but it may be mor...

alrededor de 9 años hace | 0

| aceptada

Respondida
Return conditional from mrdivide
You could use the linsolve function, with a second output argument: [x, rcond] = linsolve(A, b); This solves the linear s...

alrededor de 9 años hace | 1

| aceptada

Respondida
How to easily solve an equation of the form AX =B where A is a large sparse matrix???
P1: With the Finite Difference Method, the matrix will often be singular if there aren't sufficient boundary conditions added to...

alrededor de 9 años hace | 0

Respondida
How to replace the diagonal elements of a matrix with 0 fro avoiding self loops?
If you are using the graph/digraph classes, you can also tell the constructor not to insert any self-loops for the diagonal elem...

alrededor de 9 años hace | 1

Respondida
Calculate number of following nodes in a directed graph
For one particular node, you can use nearest(G, u, Inf) to get a list of all nodes that are reachable from node G, at any...

alrededor de 9 años hace | 0

| aceptada

Respondida
To get dominant eigen vector
I realize this is an old post, but this might be helpful to others: One reason for EIG to return complex values with very sma...

alrededor de 9 años hace | 0

Cargar más