Parseval's Theorem for Laplace Transform

Manish Kumar Saini
Updated on 07-Jan-2022 06:37:18

3K+ Views

Laplace TransformThe Laplace transform is a mathematical tool which is used to convert the differential equation in time domain into the algebraic equations in the frequency domain or s-domain.Mathematically, if $\mathit{x}\mathrm{\left(\mathit{t}\right)}$ is a time domain function, then its Laplace transform is defined as −$$\mathrm{\mathit{L}\mathrm{\left[\mathit{x}\mathrm{\left(\mathit{t}\right)}\right]}\:\mathrm{=}\:\mathit{X}\mathrm{\left(\mathit{s}\right)}\:\mathrm{=}\:\int_{-\infty}^{\infty}\mathit{x}\mathrm{\left(\mathit{t}\right)}\mathit{e^{-st}}\:\mathit{dt}}$$Inverse Laplace TransformThe inverse Laplace transform is the method for obtaining the time domain function from its Laplace transform and mathematically, it is defined as −$$\mathrm{\mathit{L}^{-\mathrm{1}}\mathrm{\left[\mathit{X}\mathrm{\left(\mathit{s}\right)}\right]}\:\mathrm{=}\:\mathit{x}\mathrm{\left(\mathit{t}\right)}\:\mathrm{=}\:\frac{1}{2\pi \mathit{j}}\int_{\mathrm{\left ( \sigma -\mathit{j\infty} \right )}}^{\mathrm{\left (\mathit{\sigma \mathrm{+}\mathit{j}\infty}\right )}}\mathit{X}\mathrm{\left(\mathit{s}\right)}\mathit{e^{st}}\:\mathit{ds}}$$Parseval’s Theorem for Laplace TransformStatement - The Parseval’s theorem or Parseval’s relation for Laplace transform states that if, $$\mathrm{\mathit{x}_{\mathrm{1}}\mathrm{\left(\mathit{t}\right)}\overset{\mathit{LT}}{\leftrightarrow}\mathit{X}_{\mathrm{1}}\mathrm{\left(\mathit{s}\right)}\:\mathrm{and}\:\mathit{x}_{\mathrm{2}}\mathrm{\left(\mathit{t}\right)}\overset{\mathit{LT}}{\leftrightarrow}\mathit{X}_{\mathrm{2}}\mathrm{\left(\mathit{s}\right)}}$$Where, $\mathit{x}_{\mathrm{1}}\mathrm{\left(\mathit{t}\right)}$ and $\mathit{x}_{\mathrm{2}}\mathrm{\left(\mathit{t}\right)}$ are ... Read More

Compute Condition Number using PyTorch Torch Linalg

Shahid Akhtar Khan
Updated on 07-Jan-2022 06:30:16

310 Views

To compute the condition number of a matrix with respect to a matrix norm, we could apply torch.linalg.cond() method. It returns a new tensor with computed condition number. It accepts a matrix, a batch of matrices and also batches of matrices. A matrix is a 2D torch Tensor. It supports input of float, double, cfloat, and cdouble data typesSyntaxtorch.linalg.cond(M, p=None)ParametersM – A matrix or batch of matrices.p – A type of matrix norm to be used in computation of condition number. Default matrix norm is 2-norm.It returns a real-valued tensor of condition number.StepsWe could use the following steps to compute the ... Read More

Compute the Pseudoinverse of a Matrix in PyTorch

Shahid Akhtar Khan
Updated on 07-Jan-2022 06:26:38

712 Views

To compute the pseudoinverse of a square matrix, we could apply torch.linalg.pinv() method. It returns a new tensor with pseudoinverse of the given matrix. It accepts a matrix, a batch of matrices and also batches of matrices. A matrix is a 2D torch Tensor. It supports input of float, double, cfloat, and cdouble data types.Syntaxtorch.linalg.pinv(M)Where M is a matrix or batches of matrices.StepsWe could use the following steps to compute the pseudoinverse of a matrix −Import the required library. In all the following examples, the required Python library is torch. Make sure you have already installed it.import torchDefine a matrix. ... Read More

Compute the Inverse of a Square Matrix in PyTorch

Shahid Akhtar Khan
Updated on 07-Jan-2022 06:21:14

1K+ Views

To compute the inverse of a square matrix, we could apply torch.linalg.inv() method. It returns a new tensor with inverse of the given matrix. It accepts a square matrix, a batch of square matrices, and also batches of square matrices.A matrix is a 2D torch Tensor. It supports input of float, double, cfloat, and cdouble data types. The inverse matrix exists if and only if the square matrix is invertible.Syntaxtorch.linalg.inv(M)Where M is a square matrix or a batch of square matrices. It returns the inverse matrix.StepsWe could use the following steps to compute the inverse of a square matrix −Import ... Read More

Compute the Norm of a Vector or Matrix in PyTorch

Shahid Akhtar Khan
Updated on 07-Jan-2022 06:16:07

1K+ Views

To compute the norm of a vector or a matrix, we could apply torch.linalg.norm() method. It returns a new tensor with computed norm. It accepts a vector, matrix, a batch of matrices and also batches of matrices.A vector is a 1D torch Tensor where a matrix is a 2D torch Tensor. It supports input of float, double, cfloat, and cdouble data types. We can compute the norm of the matrix or batch/es of matrices along the different dimensions. For example, we could compute the norm of a matrix along dimension 0 or along dimension1.Syntaxtorch.linalg.norm(A)A is a vector, matrix or batch/s ... Read More

PyTorch Torch Linalg Solve Method

Shahid Akhtar Khan
Updated on 07-Jan-2022 06:15:03

827 Views

To solve a square system of linear equations with unique solution, we could apply the torch.linalg.solve() method. This method takes two parameters −first, the coefficient matrix A, andsecond, the right-hand tensor b.Where A is a square matrix and b is a vector. The solution is unique if A invertible. We can solve a number of systems of linear equations. In this case, A is a batch of square matrices and b is a batch of vectors.Syntaxtorch.linalg.solve(A, b)ParametersA – Square matrix or batch of square matrices. It is the coefficient matrix of system of linear equations.b – Vector or a batch ... Read More

Compute the Determinant of a Square Matrix in PyTorch

Shahid Akhtar Khan
Updated on 07-Jan-2022 06:14:10

997 Views

To compute the determinant of a square matrix, we could apply torch.linalg.det() method. It returns a new tensor with computed determinant. It accepts a square matrix, a batch of square matrices and also batches of square matrices. It supports matrix of float, double, cfloat, and cdouble data types.We could also apply torch.det() method to compute the determinant. It is an alias of the torch.linalg.det() method.Syntaxtorch.linalg.det(mat) torch.det(mat)Where mat is a square matrix or batch/s of square matrices. A matrix is a 2D torch tensor.StepsWe could use the following steps to compute determinant of a square matrix −Import the required library. In ... Read More

Compute Logistic Sigmoid Function of Tensor Elements in PyTorch

Shahid Akhtar Khan
Updated on 07-Jan-2022 06:12:35

1K+ Views

To compute the logistic function of elements of a tensor, we use torch.special.expit() method. It returns a new tensor with computed logistic function element-wise. It accepts torch tensor of any dimension. We could also apply torch.sigmoid() method to compute the logistic function of elements of the tensor. It is an alias of the torch.special.expit() method.Syntaxtorch.special.expit(input) torch.sigmoid(input)Where input is a torch tensor of any dimension.StepsWe could use the following steps to compute logistic sigmoid function of a tensor element-wise −Import the required library. In all the following examples, the required Python library is torch. Make sure you have already installed it.import ... Read More

Compute QR Decomposition of a Matrix in PyTorch

Shahid Akhtar Khan
Updated on 07-Jan-2022 06:10:48

346 Views

torch.linalg.qr() computes the QR decomposition of a matrix or a batch of matrices. It accepts matrix and batch of matrices of float, double, cfloat and cdouble data types.It returns a named tuple (Q, R). Q is orthogonal when the matrix is real valued and unitary when matrix is complex valued. And R is an upper triangular matrix.Syntax(Q, R) = torch.linalg.qr(mat, mode='reduced')ParametersMat – Square matrix or a batch of square matrices.mode – It decides mode of QR decomposition. It is set to one of three modes, 'reduced', 'complete', and 'r'. Default is set to 'reduced'. It's an optional parameter.StepsImport the required library. In ... Read More

Compute Error Function of a Tensor in PyTorch

Shahid Akhtar Khan
Updated on 07-Jan-2022 06:10:14

389 Views

To compute the error function of a tensor, we use the torch.special.erf() method. It returns a new tensor with computed error function. It accepts torch tensor of any dimension. It is also known as Gauss error functionStepsWe could use the following steps to compute the error function of a tensor element-wise −Import the required library. In all the following examples, the required Python library is torch. Make sure you have already installed it.import torchDefine a torch tensor. Here we define a 2D tensor of random numbers.tensor = torch.randn(2, 3, 3)Compute the error function of the above-defined tensor using torch.special.erf(tensor). Optionally ... Read More

Advertisements