The above described procedure can be summarized in two main parts. \(\square \) 3.3 Summary of the Integration Procedure For example, if one of A or B is a scalar, then the scalar is combined with each element of the other array. If the sizes of A and B are compatible, then the two arrays implicitly expand to match each other. The sizes of A and B must be the same or be compatible. expmv - Matrix exponential times a vector. \(\beta = \gamma = 0\) in ( 6)), by using the matrix sine and matrix cosine functions, the explicit form of the matrix exponential \($$ C A.B multiplies arrays A and B by multiplying corresponding elements. I think it is optimized for minimizing data storage, not matrix multiplication.For the undamped wave equations (i.e. I will warn you that I find Matlab does not do so well taking products of sparse matrices. This topic shows how to compute matrix powers and exponentials using a variety of methods. tf ismember (y, x) You can then use this result to replace all of the values that arent in y with NaN. It will return a logical array the size of the first input that is true wherever the value is in the second input and false otherwise. However, for a vector x, x 2 is not defined. You can use ismember to check for membership between two arrays. It can also be applied to matrices for which exponentiation is well defined (in this case the 1 in the right-hand side of the equation should be replaced by the identity I). It is then a question of how-sparse you start with vs. If x is a real number, the definition can be used to find the corresponding function value. Now get (say from a truncated power series) a polynomial that is close enough for your purposes to the actual exponential on the spectrum of your matrix.Įven if you can't figure which matrix elements of the answer you will zero-out, if you can accept a modest error and so deal with a polynomial of relatively small degree, then you are just needing to compute several powers of a sparse matrix. Y expm (X) computes the matrix exponential of X. ![]() This norm estimate, rounded up a bit for good measure, tells you where the spectrum of your matrix sits. Calculating matrix exponential times a vector in Python. This submission computes the action of the matrix exponential on a vector without explicitly computing the matrix exponential. Version 1.0.0.0 (9.25 KB) by Nick Higham Computing the matrix exponential times a vector without explicitly computing the matrix exponential. e z e x (sin y + i cos y) Now we will understand the above syntax with the help of various examples. - File Exchange - MATLAB Central Matrix exponential times a vector. It can also be used for complex elements of the form z x + iy. The code there simplifies in the case $p=2$, which is the case you want. y exp ( X ) will return the exponential function ‘e’ raised to the power ‘x’ for every element in the array X. The data type of Y is the same as that of X. For real values of X in the interval (-Inf, Inf), Y is in the interval (0,Inf). Higham, Numerische Mathematik, 62(1), 539-555, (1992). Exponential values, returned as a scalar, vector, matrix, multidimensional array, table, or timetable. In other languages see: "Estimating the matrix p-norm" by Nicholas J. ![]() To decide what polynomial to use, I would suggest you get an approximation of the operator norm. If your graph is related to a surface, you have an idea of how far apart on the graph two vertices need to be before they can be neglected. If you have some way of determining a priori which matrix elements will be small, you can compute a polynomial of the matrix quickly. Much of the paper covers continuous functions applied to sparse hermitian matrices. before the operand marks an element-wise operation, as opposed to matrix operation. If you want element-wise operations in Matalb, you need to type. The paper has applications that go beyond what the title indicates. When you type a2 in Matlab, what you are actually executing is aa (Matrix multiplication). Have a look at a recent paper discussing how matrix sparseness and locality go together: "Decay Properties of Spectral Projectors with Applications to Electronic Structure" by Benzi et al.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |