Python - Virtual Environment

Python的虚拟环境(virtual environment)是一个独立的Python运行环境。在一个独立的环境中,可以正常安装所需要的数据包(如使用pip等)。既不受系统环境的影响,也不会对系统环境产生影响。具体地,创建虚拟环境就是把系统Python环境复制到所创建的独立环境中。当进入一个虚拟环境时,virtualenv会修改相关的环境变量,让python和pip指向当前的独立环境。

[Read More]

Emacs - Doxygen

Introduction

Doxygen1 is a powerful tool to document the source codes. In principle, it parses the specially formated comments from the source codes and then produces very professional documents. Up to now, it is able to support almost all the popular programming languages, e.g. C/C++, Java, Python, and etc.

[Read More]

Python - TDoc

Introduction

In order to facilitate the tdoc. related processing, I wrote a simple module using Python, termed tdoc, based on

  • Builtin modules, os, functools, multiprocessing, argparse; and
  • 3rd party libraries, pandas, pybtex, urllib.
[Read More]

Orthogonal Matching Pursuit (OMP)

Matching pursuit (MP) and its improvement orthogonal matching pursuit (OMP) are both popular algorithms in compressive sensing (CS). Compared to MP, OMP can offer better performance, e.g. in respects of higher precision and faster convergency. This post aims to summarize the detailed procedure of OMP.

[Read More]

Linux - Makefile

As is well-known, makefile is a text file which specifies the behavior of make. According to the rules in makefile, a project can be automatically built in a fairly smart way.

[Read More]

Least Square and Its Iterative Approach (RLS)

Introduction

As is well-known, least square (LS) is the optimal linear unbiased estimator, which plays an extremely important role in the classic estimation theory. This document motivates to illustrate the fundamental of LS algorithm. However, LS algorithm suffers rather high complexity, especially for the operation of matrix inversion, which greatly limits its application in practice. In order to reduce the computational complexity, an iterative approach, a.k.a. recursive LS (RLS), has been proposed.

The remainder part of the document is structured as follows. In Section #sec:ls, the principle of LS algorithm is derived in detail. Then its iterative solution, i.e., RLS algorithm, follows in Section #sec:rls.

[Read More]

Fourier Transform

Fourier Series

Continuous Fourier Series

\[\begin{aligned} \tilde{x}(t) &= \frac{1}{T} \sum_{k=-\infty}^{\infty}X_a \left( k\frac{2\pi}{T} \right) e^{j\frac{2\pi}{T}kt} \\ X_a \left( k\frac{2\pi}{T} \right) &= \int_{-\frac{T}{2}}^{\frac{T}{2}} \tilde{x}(t) e^{-j\frac{2\pi}{T}kt} dt \end{aligned}\]

Discrete Fourier Series

\[\begin{aligned} \tilde{x}(n) &= \frac{1}{N} \sum_{k=0}^{N-1} \tilde{X}(k)e^{j\frac{2\pi}{N}kn} \\ \tilde{X}(k) &= \sum_{n=0}^{N-1} \tilde{x}(n) e^{-j\frac{2\pi}{N}nk} \end{aligned}\]

Properties

\[\begin{aligned} \tilde{x}(n+m) &\leftrightarrow \tilde{X}(k)e^{j\frac{2\pi}{N}km} \\ \tilde{x}^{*}(n) &\leftrightarrow \tilde{X}^{*}(-k) \\ \tilde{x}(-n) &\leftrightarrow \tilde{X}(-k) \\ \sum_{m=0}^{N-1} \tilde{x}_1(m) \tilde{x}_2(n-m) &\leftrightarrow \tilde{X}_1(k) \tilde{X}_2(k) \\ \tilde{x}_1(n) \tilde{x}_2(n) &\leftrightarrow \frac{1}{N} \sum_{\ell=0}^{N-1} \tilde{X}_1(\ell) \tilde{X}_2(k-\ell) \\ \tilde{x}_e(n) &\leftrightarrow \tilde{X}_r(k) \\ \tilde{x}_o(n) &\leftrightarrow j\tilde{X}_i(k) \\ \tilde{x}_r(n) &\leftrightarrow \tilde{X}_e(k) \\ j\tilde{x}_i(n) &\leftrightarrow \tilde{X}_o(k) \end{aligned}\] where subscript \(r\), \(i\), \(e\), and \(o\) mean the real, imagnary, even, and odd parts of an expression, respectively, i.e, \[\begin{aligned} \tilde{x}(n) &= \tilde{x}_e(n) + \tilde{x}_o(n) \\ &= \tilde{x}_r(n) + j \tilde{x}_i(n) \\ \tilde{x}_e(n) &= \frac{\tilde{x}(n) + \tilde{x}(-n)}{2} \\ \tilde{x}_o(n) &= \frac{\tilde{x}(n) - \tilde{x}(-n)}{2} \\ \tilde{X}(k) &= \tilde{X}_e(k) + \tilde{X}_o(k) \\ &= \tilde{X}_r(k) + j \tilde{X}_i(k) \\ \tilde{X}_e(k) &= \frac{\tilde{X}(k) + \tilde{X}(-k)}{2} \\ \tilde{X}_o(k) &= \frac{\tilde{X}(k) - \tilde{X}(-k)}{2}. \end{aligned}\]

Wide Sense Fourier Series

Continuous

Given a continuous time signal space \(\mathcal{S}\) defined in range \((t_1, t_2)\), if \(\{\phi_i(t) \mid i=1, 2, \ldots, N\}\) is a complete orthogonal basis in \(\mathcal{S}\), \(\forall x(t) \in \mathcal{S}\), it can be represented as a linear combination of the basis, i.e., \[\begin{aligned} x(t) = \sum_{i=1}^N a_i \phi_i(t), \end{aligned}\] where \[\begin{aligned} a_i = \dfrac{\int_{t_1}^{t_2} x(t) \phi_i^{*}(t) dt}{\int_{t_1}^{t_2}|\phi_i(t)|^2dt}, \quad i = 1, 2, \ldots, N. \end{aligned}\]

Discrete

Given a discrete time signal space \(\mathcal{S}\) defined in range \((n_1, n_2)\), if \(\{\phi_i[n] \mid i=1, 2, \ldots, N\}\) is a complete orthogonal basis in \(\mathcal{S}\), \(\forall x[n] \in \mathcal{S}\), it can be represented as a linear combination of the basis, i.e., \[\begin{aligned} x[n] = \sum_{i=1}^N a_i \phi_i[n], \end{aligned}\] where \[\begin{aligned} a_i = \dfrac{\sum_{n=n_1}^{n_2} x[n] \phi_i^{*}[n]}{\sum_{n=n_1}^{n_2}|\phi_i[n]|^2}, \quad i = 1, 2, \ldots, N. \end{aligned}\]

[Read More]

LaTeX - Pgf/Tikz

Introduction

Pgf/tikz is an excellent LaTeX package to plot high quality graphs. This post just summaries its basic usages.

[Read More]

Cramer-Rao Bound

In parameter estimation, the performance of an estimator is usually evaluated in the respects of unbiasedness, efficiency, and consistency.

[Read More]
Tags: math 

Emacs - RefTeX

RefTeX is a Emacs package dedicated for label, reference, citation, and index related operations in \LaTeX. What is exciting, RefTeX has been integrated into Emacs since version 20.2.

[Read More]