Professional Interests: numerical linear algebra, graph algorithms

Answered

Eigenvectors and the null function

I'm getting those two eigenvectors when I copy your code into MATLAB: >> D = [2 -1; -1 3]; eigs = eig(D); q1 = nu...

Eigenvectors and the null function

I'm getting those two eigenvectors when I copy your code into MATLAB: >> D = [2 -1; -1 3]; eigs = eig(D); q1 = nu...

1 day ago | 0

Answered

Block-diagonalization of a matrix

There is no direct function to do this. The best is probably to write a function that does a loop through the different blocks a...

Block-diagonalization of a matrix

There is no direct function to do this. The best is probably to write a function that does a loop through the different blocks a...

1 day ago | 0

Answered

How created a graph from unordered node list?

When a graph or digraph is specified using numbers, the assumption is that all nodes of this graph have numbers from 1:numberOfN...

How created a graph from unordered node list?

When a graph or digraph is specified using numbers, the assumption is that all nodes of this graph have numbers from 1:numberOfN...

2 days ago | 0

| accepted

Answered

nonsingular matrix (X) in GSVD function

These are just different but equivalent definitions: Both will result in the same C and S, the only difference is in how X is re...

nonsingular matrix (X) in GSVD function

These are just different but equivalent definitions: Both will result in the same C and S, the only difference is in how X is re...

2 days ago | 0

Answered

accuracy of two methods to solve eignvalues/eignvector problem

The second way is typically more accurate, because it doesn't incur additional round-off error when conputing inv(Sw) and when m...

accuracy of two methods to solve eignvalues/eignvector problem

The second way is typically more accurate, because it doesn't incur additional round-off error when conputing inv(Sw) and when m...

5 days ago | 0

| accepted

Answered

Sort eigenvectors matrix.

Take a look at rsf2csf. For a block-diagonal matrix with 1-by-1 and 2-by-2 blocks, it computes a diagonal eigenvalue matrix and ...

Sort eigenvectors matrix.

Take a look at rsf2csf. For a block-diagonal matrix with 1-by-1 and 2-by-2 blocks, it computes a diagonal eigenvalue matrix and ...

13 days ago | 1

Answered

Eigenvectors of an SPD matrix being saved as complex doubles

EIG does not recognize the input matrix as symmetric because it's not exactly symmetric. If you compute A = Y'*Mh*Y norm(A - A...

Eigenvectors of an SPD matrix being saved as complex doubles

EIG does not recognize the input matrix as symmetric because it's not exactly symmetric. If you compute A = Y'*Mh*Y norm(A - A...

16 days ago | 0

| accepted

Answered

Given a matrix A^n. Comparing normal multiplication versus Diagonalization. I expect the former to be faster but its not in my case

A^2 is just one matrix multiplication, A*A, which is much faster to do directly than the call to EIG. For larger n, A^n isn't ...

Given a matrix A^n. Comparing normal multiplication versus Diagonalization. I expect the former to be faster but its not in my case

A^2 is just one matrix multiplication, A*A, which is much faster to do directly than the call to EIG. For larger n, A^n isn't ...

1 month ago | 0

| accepted

Answered

how to random initialize svd function in matlab??

The linear algebra functions in MATLAB are run-to-run reproducible, meaning if you call them twice with the exact same input, yo...

how to random initialize svd function in matlab??

The linear algebra functions in MATLAB are run-to-run reproducible, meaning if you call them twice with the exact same input, yo...

1 month ago | 1

| accepted

Answered

EigenValues of a Vibrating system

Usually for finite element problems, the stiffness matrix is passed in as the first input, and the mass matrix as the second inp...

EigenValues of a Vibrating system

Usually for finite element problems, the stiffness matrix is passed in as the first input, and the mass matrix as the second inp...

1 month ago | 0

| accepted

Answered

issues with Cholesky decomposition

This can happen if your matrix is close to symmetric positive semi-definite (meaning the smallest eigenvalue is around machine e...

issues with Cholesky decomposition

This can happen if your matrix is close to symmetric positive semi-definite (meaning the smallest eigenvalue is around machine e...

1 month ago | 0

Answered

Can I preserve adding order when calling graph/addedge?

The edges in a graph are always presented in the same order (sort first by source node, secondarily be target node). You can mai...

Can I preserve adding order when calling graph/addedge?

The edges in a graph are always presented in the same order (sort first by source node, secondarily be target node). You can mai...

1 month ago | 1

| accepted

Answered

Display only one eigenvalue of symbolic matrix

The eigs function is not supported for symbolic values, as it is specifically based on getting a good approximation based on an ...

Display only one eigenvalue of symbolic matrix

The eigs function is not supported for symbolic values, as it is specifically based on getting a good approximation based on an ...

2 months ago | 0

Answered

how to do forward neighbor discovery in un-directed graph?

If I understand correctly, you want to find all nodes that are direct neighbors of n1, then all nodes that connect to n1 through...

how to do forward neighbor discovery in un-directed graph?

If I understand correctly, you want to find all nodes that are direct neighbors of n1, then all nodes that connect to n1 through...

2 months ago | 0

Answered

Using eigs with singular matrix

The 'smallestabs' option in eigs depends on solving several linear systems with the matrix A that's being passed in. If A is sin...

Using eigs with singular matrix

The 'smallestabs' option in eigs depends on solving several linear systems with the matrix A that's being passed in. If A is sin...

2 months ago | 0

| accepted

Answered

Change the alignment and font size of edgelabels

The edge labels provided with the plot of a graph can't be modified in terms of their alignment. However, you can add standard t...

Change the alignment and font size of edgelabels

The edge labels provided with the plot of a graph can't be modified in terms of their alignment. However, you can add standard t...

2 months ago | 0

| accepted

Answered

a question for defining Custom Deep Learning Layer

You can use the svd in a custom layer, however, if the SVD is used in the forward method of a custom layer, this will likely req...

a question for defining Custom Deep Learning Layer

You can use the svd in a custom layer, however, if the SVD is used in the forward method of a custom layer, this will likely req...

2 months ago | 0

| accepted

Answered

Control edge alpha via edge weights to visualize a dynamic network

You can set the LineStyle to be 'none' for edges that should not be displayed: >> g = digraph([3 1 2], [2 3 1], [0 0.5 1]); >>...

Control edge alpha via edge weights to visualize a dynamic network

You can set the LineStyle to be 'none' for edges that should not be displayed: >> g = digraph([3 1 2], [2 3 1], [0 0.5 1]); >>...

2 months ago | 1

| accepted

Answered

how to create a symmetric Toeplitz matrix with bounds on eigenvalues?

You can use the MATLAB function toeplitz with one input argument (two-input returns a non-symmetric Toeplitz matrix).

how to create a symmetric Toeplitz matrix with bounds on eigenvalues?

You can use the MATLAB function toeplitz with one input argument (two-input returns a non-symmetric Toeplitz matrix).

2 months ago | 0

Answered

Interpolation for n-dimensional array data

I don't think interpn would work very well for you: The U, S and V matrices returned by SVD are not linearly dependent on the in...

Interpolation for n-dimensional array data

I don't think interpn would work very well for you: The U, S and V matrices returned by SVD are not linearly dependent on the in...

3 months ago | 1

Answered

eigs gives wrong eigenvalues

Edit: Please see the comment below, the first answer I gave here was going in the wrong direction. Thank you for the detailed d...

eigs gives wrong eigenvalues

Edit: Please see the comment below, the first answer I gave here was going in the wrong direction. Thank you for the detailed d...

3 months ago | 2

Answered

How can I solve linear equation system in parallel?

As John says, if you are using decomposition on one computer with several cores, the solver used already will use those cores if...

How can I solve linear equation system in parallel?

As John says, if you are using decomposition on one computer with several cores, the solver used already will use those cores if...

3 months ago | 1

Answered

Why Power of Matrix with decimal values gives really big numbers?

For a Markov Chain, you need the sum of each row to be 1 (as this represents the probability to transition to any state), and ev...

Why Power of Matrix with decimal values gives really big numbers?

For a Markov Chain, you need the sum of each row to be 1 (as this represents the probability to transition to any state), and ev...

3 months ago | 0

Answered

Which Right Eigenvector to report?

The left and right eigenvectors are matched one-by-one. For example, for [V, D, W] = eig(A), the eigenvalue D(k, k) corresponds ...

Which Right Eigenvector to report?

The left and right eigenvectors are matched one-by-one. For example, for [V, D, W] = eig(A), the eigenvalue D(k, k) corresponds ...

3 months ago | 0

Answered

eigs for generalized eigenvalue problem ( [V,D] = eigs(A,B) ) with spars matrix

A bug was introduced in R2017b in eigs for matrices with exact zero eigenvalues. This bug has been fixed in R2019a, the fix appl...

eigs for generalized eigenvalue problem ( [V,D] = eigs(A,B) ) with spars matrix

A bug was introduced in R2017b in eigs for matrices with exact zero eigenvalues. This bug has been fixed in R2019a, the fix appl...

4 months ago | 1

Answered

Error using eig Input matrix contains NaN or Inf from images

The variable covariance_matrix contains non-finite values (either Inf meaning infinity, returned for example from 1/0, or NaN me...

Error using eig Input matrix contains NaN or Inf from images

The variable covariance_matrix contains non-finite values (either Inf meaning infinity, returned for example from 1/0, or NaN me...

4 months ago | 0

Answered

Why are eigenvector matrices computed by matlab not idempotent

Hi Marco, You seem to be confusing two terms: A matrix M is idempotent if ; it's orthogonal if , which is what you are testing ...

Why are eigenvector matrices computed by matlab not idempotent

Hi Marco, You seem to be confusing two terms: A matrix M is idempotent if ; it's orthogonal if , which is what you are testing ...

4 months ago | 2

| accepted

Answered

Warning: Matrix is close to singular or badly scaled. Results may be inaccurate. RCOND = 7.252760e-17.

As lambda approaches an eigenvalue of A (which is the goal of your algorithm), the matrix A - lambda*eye(size(A)) becomes close ...

Warning: Matrix is close to singular or badly scaled. Results may be inaccurate. RCOND = 7.252760e-17.

As lambda approaches an eigenvalue of A (which is the goal of your algorithm), the matrix A - lambda*eye(size(A)) becomes close ...

4 months ago | 1

| accepted

Answered

How to compute efficiently A^(-1)*(1-exp(-A*h))?

For most sparse matrices expm(A) will be dense, so that should be expected to be expensive with a 1e4-by-1e4 matrix. If you are ...

How to compute efficiently A^(-1)*(1-exp(-A*h))?

For most sparse matrices expm(A) will be dense, so that should be expected to be expensive with a 1e4-by-1e4 matrix. If you are ...

4 months ago | 0

| accepted

Answered

How to add svd(singular value decomposition) in a custom layer

When dlarray supports a function, this means, most of all, that it supports automatic differentiation of this function - which f...

How to add svd(singular value decomposition) in a custom layer

When dlarray supports a function, this means, most of all, that it supports automatic differentiation of this function - which f...

4 months ago | 0