Rank: 579 based on 251 downloads (last 30 days) and 11 files submitted
photo

Andrew Knyazev

E-mail

Personal Profile:

http://en.wikipedia.org/wiki/Andrei_Knyazev_(mathematician)


 

Watch this Author's files

 

Files Posted by Andrew Knyazev View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
06 Jan 2012 Screenshot Newton's method done right Newton's method for solving systems of nonlinear equations, including nonsquare and inconsistent Author: Andrew Knyazev mathematics, physics, modeling, matrix, newton, nonlinear 64 2
08 Dec 2011 Screenshot ODE Tutorial Demo Advanced examples of using the MATLAB Symbolic Math Toolbox for Ordinary Differential Equations Author: Andrew Knyazev ode, symbolic, movies, demo, physics, mathematics 17 0
17 Oct 2011 Screenshot lobpcg.m LOBPCG solves Hermitian partial generalized eigenproblems using preconditioning, competes with eigs Author: Andrew Knyazev linear algebra, symmetric, partial, eigenproblems, preconditioning, eigenproblem 31 6
  • 4.5
4.5 | 2 ratings
14 Sep 2011 Screenshot Best polynomial approximation in uniform norm For a given function on an interval, the code calculates the min-max approximation by a polynomial. Author: Andrew Knyazev mathematics, statistics, optimization, approximation, polynomial, minimax 9 0
03 Sep 2011 Screenshot pcg.m with 'null' and 'flex' options Preconditioned Conjugate Gradients handles homogeneous equations and nonsymmetric preconditioning Author: Andrew Knyazev linear algebra, preconditioned, conjugate, gradients, mathematics, matrix 12 0
Comments and Ratings by Andrew Knyazev View all
Updated File Comments Rating
20 May 2014 Laplacian in 1D, 2D, or 3D Sparse (1-3)D Laplacian on a rectangular grid with exact eigenpairs. Author: Andrew Knyazev

Dear Ales,
Not hearing back from you, I have performed a few tests myslef, in 1D, 2D and 3D. Please the results quoted below. I see no problems with the code, and close this bug case.
Thanks, Andrew
+++++++++++++++++++++++++++++++++++

octave:52> [lambda,V,A] = laplacian([2,4,5],{'P' 'P' 'P'}, 20);
ans =
Warning: (m+1)th eigenvalue is nearly equal
to mth.

The eigenvectors take 6400 bytes
The Laplacian matrix takes 3524 bytes

octave:53> whos
Variables in the current scope:

Attr Name Size Bytes Class
==== ==== ==== ===== =====
A 40x40 3524 double
V 40x20 6400 double
lambda 20x1 160 double

Total is 1100 elements using 10084 bytes

octave:54> [lambda,V,A] = laplacian([2,4],{'P' 'P' }, 2);
ans =
Warning: (m+1)th eigenvalue is nearly equal
to mth.

The eigenvectors take 128 bytes
The Laplacian matrix takes 516 bytes

octave:55> whos
Variables in the current scope:

Attr Name Size Bytes Class
==== ==== ==== ===== =====
A 8x8 516 double
V 8x2 128 double
lambda 2x1 16 double

Total is 58 elements using 660 bytes

octave:56> [lambda,V,A] = laplacian([2],{'P'}, 2);

The eigenvectors take 32 bytes
The Laplacian matrix takes 60 bytes

octave:57> whos
Variables in the current scope:

Attr Name Size Bytes Class
==== ==== ==== ===== =====
A 2x2 60 double
V 2x2 32 double
lambda 2x1 16 double

Total is 10 elements using 108 bytes

17 May 2014 Laplacian in 1D, 2D, or 3D Sparse (1-3)D Laplacian on a rectangular grid with exact eigenpairs. Author: Andrew Knyazev

Re: no solution when periodic BC are applied.

Dear Ales,
Could you please provide a specific complete example, quoting the function call, the full output, and MATLAB version? I cannot fix a problem without being able to reproduce the problem myslef.
Thanks, Andrew

22 Oct 2012 Newton's method done right Newton's method for solving systems of nonlinear equations, including nonsquare and inconsistent Author: Andrew Knyazev

The code works in Symbolic Math Toolbox 5.7 (R2011b). Previous versions of the toolbox may not support creating symbolic vectors this way. There may be other issues, too, with prior unsupported versions of the toolbox.

12 Mar 2012 Laplacian in 1D, 2D, or 3D Sparse (1-3)D Laplacian on a rectangular grid with exact eigenpairs. Author: Andrew Knyazev

Re: Marios Karaoulis

It depends on boundary conditions. Your example apparently uses Neumann boundary condition as is http://en.wikipedia.org/wiki/Laplacian_matrix#As_an_approximation_to_the_negative_continuous_Laplacian
while the code default us the Dirichlet boundary conditions. To get your matrix, please use

[~,~,A]=laplacian([3 3],{'NN' 'NN'})

full(A) shows what you want:

2 -1 0 -1 0 0 0 0 0
-1 3 -1 0 -1 0 0 0 0
0 -1 2 0 0 -1 0 0 0
-1 0 0 3 -1 0 -1 0 0
0 -1 0 -1 4 -1 0 -1 0
0 0 -1 0 -1 3 0 0 -1
0 0 0 -1 0 0 2 -1 0
0 0 0 0 -1 0 -1 3 -1
0 0 0 0 0 -1 0 -1 2

12 Oct 2011 Newton Method in N dimensions Simple implementation of Newton's method, in n dimensions, taking input of >=n equations. Author: Kyle Drerup

Simple, general and nice! The best I have on the block so far.

Missing: limit number of steps, check for stagnation. default for the tolerance.

Cannot you just always use F_prime_X\F_X ?

Comments and Ratings on Andrew Knyazev's Files View all
Updated File Comment by Comments Rating
20 May 2014 Laplacian in 1D, 2D, or 3D Sparse (1-3)D Laplacian on a rectangular grid with exact eigenpairs. Author: Andrew Knyazev Andrew Knyazev

Dear Ales,
Not hearing back from you, I have performed a few tests myslef, in 1D, 2D and 3D. Please the results quoted below. I see no problems with the code, and close this bug case.
Thanks, Andrew
+++++++++++++++++++++++++++++++++++

octave:52> [lambda,V,A] = laplacian([2,4,5],{'P' 'P' 'P'}, 20);
ans =
Warning: (m+1)th eigenvalue is nearly equal
to mth.

The eigenvectors take 6400 bytes
The Laplacian matrix takes 3524 bytes

octave:53> whos
Variables in the current scope:

Attr Name Size Bytes Class
==== ==== ==== ===== =====
A 40x40 3524 double
V 40x20 6400 double
lambda 20x1 160 double

Total is 1100 elements using 10084 bytes

octave:54> [lambda,V,A] = laplacian([2,4],{'P' 'P' }, 2);
ans =
Warning: (m+1)th eigenvalue is nearly equal
to mth.

The eigenvectors take 128 bytes
The Laplacian matrix takes 516 bytes

octave:55> whos
Variables in the current scope:

Attr Name Size Bytes Class
==== ==== ==== ===== =====
A 8x8 516 double
V 8x2 128 double
lambda 2x1 16 double

Total is 58 elements using 660 bytes

octave:56> [lambda,V,A] = laplacian([2],{'P'}, 2);

The eigenvectors take 32 bytes
The Laplacian matrix takes 60 bytes

octave:57> whos
Variables in the current scope:

Attr Name Size Bytes Class
==== ==== ==== ===== =====
A 2x2 60 double
V 2x2 32 double
lambda 2x1 16 double

Total is 10 elements using 108 bytes

17 May 2014 Laplacian in 1D, 2D, or 3D Sparse (1-3)D Laplacian on a rectangular grid with exact eigenpairs. Author: Andrew Knyazev Andrew Knyazev

Re: no solution when periodic BC are applied.

Dear Ales,
Could you please provide a specific complete example, quoting the function call, the full output, and MATLAB version? I cannot fix a problem without being able to reproduce the problem myslef.
Thanks, Andrew

16 May 2014 Laplacian in 1D, 2D, or 3D Sparse (1-3)D Laplacian on a rectangular grid with exact eigenpairs. Author: Andrew Knyazev Ales

Dear Andrew:
Thank you for a nice software. I ran into a problem -- there is no solution when periodic BC are applied. I think it is endemic to these types of problems. Do you know why?

22 Oct 2012 Newton's method done right Newton's method for solving systems of nonlinear equations, including nonsquare and inconsistent Author: Andrew Knyazev Andrew Knyazev

The code works in Symbolic Math Toolbox 5.7 (R2011b). Previous versions of the toolbox may not support creating symbolic vectors this way. There may be other issues, too, with prior unsupported versions of the toolbox.

22 Oct 2012 Newton's method done right Newton's method for solving systems of nonlinear equations, including nonsquare and inconsistent Author: Andrew Knyazev Xu

Hey,man! X=sym('X',[2 1]); is not a valid command..... Tried your algorithm, but did not work.

Contact us