Answered
inverse of matrix times vector
The problem is probably that the vector x is not exactly symmetric (because of floating-point errors). You can try just symmetri...

8 years ago | 0

| accepted

Answered
How to view/plot decomposed matrix from decomposition function
Hi, I'm afraid the decomposition object does not provide access to the factors of the decomposition. This is because, dependi...

8 years ago | 0

Answered
Eigenvalues of a 2000x2000 matrix
EIG chooses between the symmetric and non-symmetric solver based on whether the matrix is exactly symmetric (A == A'). I'm guess...

8 years ago | 0

Answered
graphshortestpath function visiting all nodes
As Steve Lord has said, in general this is an NP-complete problem, so could become quite expensive. For the 6-node graph you are...

8 years ago | 1

Answered
How does matlabs eigs normalise eigenvectors?
If the matrix B is symmetric positive definite, the eigenvectors are normalized in B-norm (and even orthogonal in B-norm if A is...

8 years ago | 0

Answered
Preserving node names in a digraph
Unfortunately, there is no direct way of doing this. The graph and digraph classes are designed to be fast when working on an ex...

8 years ago | 0

Answered
What is the space complexity of built-in eigs function in MATLAB
The largest memory requirement for |eigs| is for an array that stores a subspace of vectors, which has |size(A, 1)| rows and a n...

8 years ago | 1

| accepted

Answered
Using plot to generate a graph of a directed graph, how can i turn off the color of some lines
You can set the LineStyle property of these edges to 'none', which will make them not display. p = plot(gr4,'layout','circl...

8 years ago | 0

Answered
Error when plotting a small digraph
This bug was fixed in R2016b. I'm afraid there is no workaround except to check for the error and use another layout method ('ci...

8 years ago | 0

| accepted

Answered
Matlab code for this type of factorization.A has a SR decomposition A = SR , where S ∈ R^ 2n ×2n is a symplectic matrix, i.e. S ^TJS = J
I'm not very acquainted with the SR decomposition (all I know about it I found just now by googling). I would suggest to take a ...

8 years ago | 0

| accepted

Answered
I have make a code for block Kronecker product when both A and B have even dimension now myquestion (I want to make a code when A and B have are not even and also A is square and B is rectangular and vice versa)
I'm not sure how to do this, but take a look at the implementation of |kron| in MATLAB: edit kron.m You'll see that it us...

8 years ago | 0

| accepted

Answered
How to create a matrix B=[bij]=[max(i,j)] belongs to class of rectangular matrices
Focusing on the max(i, j) part, you could use i = 3; j = 4; B = max((1:i)', (1:j));

8 years ago | 0

Answered
How can I find a matrix which is orthogonal to another matrix?
The concept of orthogonality for a matrix is defined for just one matrix: A matrix is orthogonal if each of its column vectors i...

8 years ago | 0

Answered
Some questions on out of memory issues
Hi, 1- The eig function makes an internal copy of the input matrix, because the algorithm for computing the eigenvalues modif...

8 years ago | 1

Answered
SVDS fails to find the requested number of singular values
The algorithm used in SVDS was rewritten for R2016a (and Name-Value pairs such as 'SubspaceDimension' were added in R2017b - the...

8 years ago | 0

| accepted

Answered
Error in eigs when using Matlab 2017b?
Thank you for pointing out this bug. There is now a <https://www.mathworks.com/support/bugreports/1724250 bug report> available ...

8 years ago | 1

Answered
I am experiecing strange behavior with mrdivide/ mldivide and sparse/full matrices. How can I optimize my code ?
There is a bug in R2017a and R2017b which makes the MA57 solver work significantly more slowly (a necessary pre-processing step ...

8 years ago | 2

| accepted

Answered
Solving A{k} * x + b = 0 for large numbers of A{k} with same structure/filling.
In Tim Davis' C++ library UMFPACK, there are two phases to computing the decomposition of a matrix: The first one only uses the ...

8 years ago | 2

| accepted

Answered
singular matrix inverse using svd in 2016 and 2013 version of a matlab
Take a look at the code of PINV ( |edit pinv| ), which is using the SVD to compute the pseudo-inverse of a matrix. |x = pinv(A)*...

8 years ago | 1

Answered
MATLAB 2016a and 2017a give different results when multiplying by the complex conjugate
This is wrong behavior: the diagonal of matrix Rxx should have zero imaginary part. We will work on fixing this for a future rel...

8 years ago | 0

| accepted

Answered
Eigen values Form : A*[phi] = beta*B*[phi]
[U, D] = eig(A, B); gives you what you are looking for. All possible values of beta (eigenvalues of (A, B)) are on the diago...

8 years ago | 0

| accepted

Answered
Get node names after a graph condensation
Here is some code that does this: bins = conncomp(G); compNames = cell(max(bins), 1); for ii=1:length(bins) if ise...

8 years ago | 4

| accepted

Answered
MATLAB crashing when trying to solve 100k x 100k linear system
On Linux and Mac, programs that use nearly all of the system memory are sometimes killed by the operating system, in such a way ...

8 years ago | 1

Answered
How to do Delaunay Triangulation and return an adjacency matrix?
If your goal in computing the adjacency matrix is to construct a graph object, you can also do that (a bit) more directly: %...

8 years ago | 1

| accepted

Answered
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...

8 years ago | 3

Answered
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...

8 years ago | 1

Answered
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,...

8 years ago | 1

| accepted

Answered
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...

8 years ago | 2

Answered
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...

8 years ago | 0

Answered
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...

8 years ago | 2

| accepted

Load more