Réponse apportée
How to find the permutation matrix for the qr decomposition?
You need to compute all three matrices together: Q and R are different if the third output e is also returned. For an algorit...

environ 8 ans il y a | 2

| A accepté

Réponse apportée
How to find the permutation matrix for the qr decomposition?
I'm afraid using the three-output syntax is the only way. You can use [~, ~, p] = qr(A); but Q and R are still computed,...

environ 8 ans il y a | 0

Réponse apportée
Nonconvex: Checking positive-s​emidefinit​eness inside the Gloptipoly package
For positive definiteness, I would recommended to check this using CHOL (see if the second output registers a problem), but this...

environ 8 ans il y a | 0

| A accepté

Réponse apportée
Order of eigenvalues depending on matrix equation order of operations
The reason for the difference in this case is that matrix B is exactly symmetric, and matrix A is not. EIG detects if the input ...

environ 8 ans il y a | 1

| A accepté

Réponse apportée
Examining entries in binary matrices and creating new group matrix based on % of connections (defined by 1)
If you have each matrix stored in a separate variable, you can do Atotal = A1 + A2 + A3; % Sum of logical matrices is...

environ 8 ans il y a | 0

Réponse apportée
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...

environ 8 ans il y a | 0

| A accepté

Réponse apportée
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...

environ 8 ans il y a | 0

Réponse apportée
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...

environ 8 ans il y a | 0

Réponse apportée
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...

plus de 8 ans il y a | 1

Réponse apportée
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...

plus de 8 ans il y a | 0

Réponse apportée
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...

plus de 8 ans il y a | 0

Réponse apportée
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...

plus de 8 ans il y a | 1

| A accepté

Réponse apportée
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...

plus de 8 ans il y a | 0

Réponse apportée
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...

plus de 8 ans il y a | 0

| A accepté

Réponse apportée
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 ...

plus de 8 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 8 ans il y a | 0

| A accepté

Réponse apportée
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));

plus de 8 ans il y a | 0

Réponse apportée
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...

plus de 8 ans il y a | 0

Réponse apportée
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...

plus de 8 ans il y a | 1

Réponse apportée
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...

plus de 8 ans il y a | 0

| A accepté

Réponse apportée
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 ...

plus de 8 ans il y a | 1

Réponse apportée
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 ...

plus de 8 ans il y a | 2

| A accepté

Réponse apportée
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 ...

plus de 8 ans il y a | 2

| A accepté

Réponse apportée
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)*...

plus de 8 ans il y a | 1

Réponse apportée
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...

plus de 8 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 8 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 8 ans il y a | 4

| A accepté

Réponse apportée
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 ...

plus de 8 ans il y a | 1

Réponse apportée
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: %...

plus de 8 ans il y a | 1

| A accepté

Réponse apportée
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...

plus de 8 ans il y a | 3

Charger plus