# Tagged Questions

MATLAB is a high-level language and interactive programming environment for numerical computation and visualization developed by MathWorks. MATLAB can be used when performing tasks such as signal processing and communications, image and video processing, computational finance, and computational ...

1k views

### How to calculate $\exp(-x)$ using Taylor series

We know that the Taylor series expansion of $e^x$ is $$e^x = \sum\limits_{i=1}^{\infty}\frac{x^{i-1}}{(i-1)!}.$$ If I have to use this formula to evaluate $e^{-20}$, how ...
238 views

### Generating a random binary matrix with fixed number of nonzeros

I want an algorithm (just the idea, not the actual code) to generate a random $n$ by $n$ matrix with binary entries, but with the condition that the number of nonzeros must be a fixed number $c$. Any ...
133 views

### How to collect coefficients of the same powers?

I am using the Symbolic Math Toolbox, and define polynomials as symbolic objects, e.g.: syms a x y; P = x^2*y + a*x*y^2 + x*y^2; I am looking for a function that ...
142 views

### Evaluating differential entropies with Matlab: NaN issue

With Matlab I am trying to evaluate differential entropies. These are integrals like $$\int_\mathbb{R} p(x) \log (p(x)) \mathrm{d}x$$ where $p(x)$ is a probability density function. My $p(x)$ is ...
192 views

352 views