Hot answers tagged

7

Wolfram|Alpha has made such things easy:


6

The fft() function calculates the one-dimensional FFT of its input argument. If the input argument is a vector, then the operation is pretty simple to understand; the output is just the result of efficiently calculating a discrete Fourier transform on the input. If the input is a matrix, then, as many MATLAB functions do, each column is treated as a separate ...


5

Some "gut-level" reasons why it is better to work with the autocorrelation matrix instead of a matrix with your observations: If you want to take into account all your observations and you have a lot of data, you'll end up manipulating (inverting, multiplying) fairly large matrices. If you work with the autocorrelation matrix, you "summarize" your data once ...


4

Lets take the given matrix as $$A=\left[\begin{array}{cccccc}&0 &0 &0 &0 &0 &0 &\\ &0 &\color{red}{1} &0 &0 &0 &0 \\ &\color{red}{1} &\color{red}{1} &0 &0 &0 &0 \\ &\color{red}{1} &\color{red}{1} &0 &0 &0 &0 \\ &0 &0 &0 &0 &0 &0 \\ &...


4

An orthogonal matrix has orthogal columns, i.e. the scalar product of two different columns is zero (the case $i\neq j$). For the case $i=j$ you have $a_i^Ta_i=\|a_i\|^2>0$. So, all you can say about an orthogonal matrix with colums $a_i$ is: $$ a_i^Ta_j=\begin{cases}c_i>0 & i=j\\ 0 & i\neq j\end{cases}$$ where $c_i>0$ is some constant, ...


3

In general, a kernel is a function that acts as a parameter to some algorithm. Filtering: For example, it's possible to call the impulse response of a filter $h[n]$ a kernel, so that it is the parameter that defines the filter operation: $$ y[n] = h[n] * x[n]. $$ The use of the term kernel in the filtering context is much more common in 2D filtering or ...


3

HINT If we have the diagonal matrix: $$ D = \left[\begin{array}{cccc} d_1&0&0&0\\ 0&d_2&0&0\\ 0&0&\ddots&0\\ 0&0&0&d_n \end{array}\right]$$ Multiplying another matrix $$M_r = \left[\begin{array}{c} r_1\\ r_2\\ \vdots\\ r_n \end{array}\right]$$to the left with it multiplies each row like this: $$DM_r = \left[\...


3

You can't really have a covariance of a matrix. What you can have, is a covariance matrix of a set of vectors. So, if you think of the rows of your matrix A as two vectors in 3D: [2 3 4] and [5 5 6], then the covariance matrix of this set of two vectors is C = A' * A (A transpose times A). Note that if you shuffle the rows of A in a different order, C ...


3

It's the key point of array signal processing, I suppose. Say $x$ is the input vector of $[N,1]$ dimension collected from $N$ array sensors. $x(k)$ is its realization at the $k$ moment of time. By its definition covariance matrix (sometimes it's called autocorrelation matrix): $R = E[x\cdot x^H]$ , where $E[]$ is expectation operator and $x^H$ is Hermitian ...


3

I'm going to answer assuming that you are searching for the conceptual answer. First find all the seed voxels. You can do this in MATLAB using find(labels==1). Also have a corresponding structure containing all the surface voxels. You can get this similarly using find(labels==2). Then loop over each seed voxel which has an array index (i,j,k) and calculate ...


3

Do you just need the distance, or do you need the closest point? For the closest point, the FLANN library can help, and it has Matlab bindings. If you only need the distance, you can also use a distance transform. Try googling for "distance transform 3d matlab" for implementations. Which one is faster depends on the number of "seeds" and "skin voxels".


3

MVDR is a narrowband beamformer. For broadband signals it is usually applied for each frequency bin. That means that $\mathbf{R}_{xx}$ is frequency dependent. In other words, for each time you should have $M$ matrices, each one is $3\times 3$. Now, since you usually cannot compute $\mathbf{R}_{xx}$ exactly, you perform covariance estimation $\tilde{\mathbf{...


3

You don't chose transforms by whether they are involutions or not. If invertibility is of interest, any simple form of inverse is sufficient. Useful transforms reveal structure of some sort or separate wanted from unwanted information. That said, there are plenty involutions in signal processing. Time inversion is one, polarity inversion is another one, as ...


3

Note that $\mathbf{P} _{k\mid k-1}$, just like $\mathbf{R}_k$, is also a covariance matrix, and for this reason it is (at least) positve semi-definite, i.e., $\mathbf{y}^T\mathbf{P}_{k\mid k-1}\mathbf{y}\ge 0$ for $\mathbf{y}\neq\mathbf{0}$. Now set $\mathbf{y}=\mathbf{H}_k^T\mathbf{x}$ to see that also $\mathbf {H} _{k}\mathbf {P} _{k\mid k-1}\mathbf {H} _{...


3

The point is that circular convolution of two 1-D discrete signals can be expressed as the product of a circulant matrix and the vector representation of the other signal. The circulant matrix is a toeplitz matrix which is constructed by different circular shifts of a vector in different rows. For example, consider two signls $h[n]$ and $g[n]$, each of ...


3

The generalized eigenvalue problem is given by $$Bw=\lambda Cw\tag{1}$$ where $\lambda$ is the generalized eigenvalue of the matrices $B$ and $C$. Multiplying $(1)$ from the left with $w^H$ (with $^H$ denoting the Hermitian conjugate) and dividing both sides by $w^HCw$ (assuming that this term is non-zero), we obtain $$\frac{w^HBw}{w^HCw}=J(w)=\lambda\tag{...


2

Firstly, eigenvectors and eigenvalues are defined for operators. Correlation is an operation. Secondly, the eigenvectors of the autocorrelation are particularly interesting because they most efficiently explain the signal's variance in a linear regression. In other words, for a fixed number of vectors, selecting the eigenvectors minimizes the mean squared ...


2

Take a look on Generalized/constrained Procrustes Problems. It should be sufficient to update singular values in $\Sigma$. The $\det(SVD)=-1$ case is discussed in more detail in 1987 paper of Arun, Huang and Blostein: "Least-squares fitting of two 3-D point sets".


2

If you want to solve for single value of $ \lambda $ in the model: $$ \arg \min_{x} \frac{1}{2} {\left\| A x - b \right\|}_{2}^{2} + \lambda {\left\| x \right\|}_{1} $$ Then you can use Coordinate Descent method which is the fastest and simplest and doesn't require any matrix inversion. I have a MATLAB code for in my $ {L}_{1} $ Regularized Least Squares ...


2

The commonly called 5.1 format uses only surround channels, which are defined as rear/side channels in ITU-R BS 775. The case you want to deal with (turning rear surround channels to side surround channels) is therefore not explicitly defined. Notice that in the referenced ITU document, the case of changing the number of rear/sides loudspeakers reproducing ...


2

Try using bsxfun if your version has it. A = bsxfun(@max, B, C.') As per their documentation, bsxfun expands the dimensions of the argument matrices on-the-fly, so does not use as much memory as repmat.


2

If the matrices are not too big, repmat could work: B = [2 3]; C = [0 1 2 3]; % Vectorize the vectors for a simplication B = B(:); C = C(:); A = max(repmat(B,1,length(C)),repmat(C',length(B),1)); For those interested, Comparing BSXFUN and REPMAT and Matlab - bsxfun no longer faster than repmat? address its relative efficiency with respect to repmat. ...


2

Variance is defined as $V(x)=\frac{\sum_{i=1}^n(x_i-\mu)^2}{n}$. Just in case for you, mean $\mu$ is defined as $\mu=\frac{\sum_{i=1}^nx}{n}$. Covariance between two random variables $x$ and $y$ (or columns of a matrix) is defined as $Cov(x,y)=\frac{\sum_{i=1}^n[(x_i-\mu_x)(y_i-\mu_y)]}{n}$ and $Cov(x,x)=V(x)$. The term covariance matrix may be misleading ...


2

The function audioread doesn't generate any values, it just reads audio samples stored in a file. If you want to generate the sound of a guitar, you need to look into sound synthesis, such as the Karplus-Strong method.


2

Let me take a stab at it. You agree that $\mathbf{R}_k$ is positive definite. Since it is the variance. Now, $\mathbf{P}_{k|k-1}$ is also positive definite as it is a covariance matrix, as mentioned by @Matt L. Let us do an eigen-decomposition of $\mathbf{P}_{k|k-1} = \mathbf{Q}{\bf \Lambda}{\bf Q}^T$. The matrix ${\bf \Lambda} = diag[\lambda_1,\...


2

We have different interleaving techniques, and matrix interleaving is one of them. But at the end all of them do one thing: interleaving is a technique to protect against burst errors (no matter how we do it). To make it more clear, you should consider the reason a packet cannot be decoded (and is failed at the receiver). Each packet usually contains a ...


2

It is not clear what are you asking but I will try answer both things. Deriving the Matrix Inversion Lemma The Matrix Inversion Lemma goes as: $$ {\left( A + U C V \right)}^{-1} = {A}^{-1} - {A}^{-1} U {\left( {C}^{-1} + V {A}^{-1} U \right)}^{-1} V {A}^{-1} $$ Deriving it is by utilizing these useful identities: $$\begin{align} U + U C V {A}^{-1} U &...


2

One way is to simply model each peak with a Gaussian, with mean $\mu_i$ and variance $\sigma_i$. In fact what you mean by uncertainty corresponds to the variance. You can iteratively fit Gaussians using e.g. EM-algorithm. In MATLAB you could easily do this with built-in fitting functions: https://www.mathworks.com/help/curvefit/gaussian.html Alternatively, ...


2

A sensing matrix maps input vector to measurement vector through linear wighted summation of input. What makes a specific matrix good, is application dependent. Now, both distributions more or less satisfy RIP. However hardware implementation of the Bernoulli matrix (binary or bipolar) is much much easier especially in analog domain. A Bernoulli wight is ...


2

In your case you probably want to calculate the SNR as mean over standard deviation. signal=rand([256,192,330]); %demo data SNR = mean(signal,3)./std(signal,[],3); SNRdb = 10*log10(SNR); this way you obtain different SNR values per pixel. 256x192 pixels in 330 frames. To get the values for each of the 330 frames instead you must first reshape your matrix. ...


Only top voted, non community-wiki answers of a minimum length are eligible