Generating data with Gaussian distribution
Let $\Delta = [x_1, \dots, x_N]$ be your desired vector where $x_i$ are iid $\mathcal{N}(0,\sigma^2)$. Do you expect that $\mathrm{Pr} \left\lbrace ||\Delta||_2^2 &lt; 0.5\right\rbrace = 0.9$ ?

By definition $y = ||\Delta||_2^2 / \sigma^2 = \sum_{i=1}^N \frac{x_i^2}{\sigma^2} \sim \chi^2_N(y)$ is Chi squared distribution of degree of freedom $N$.

Thus $z = ||\Delta||_2^2 = \sigma^2y \sim \frac{1}{\sigma^2} \chi^2_N(\frac{z}{\sigma^2})$

Denote the CDF $\mathrm{F}(z)$, you want something like $\mathrm{F}(z = 0.5) = 0.9$ with $\sigma^2$ is unknown variable.

A closed form expression of $\mathrm{F}(z)$ is available at wikipedia Chi squared distribution.

In MATLAB you can use the two functions chi2pdf() and chi2cdf() for numerical brute force solution for $\sigma^2$.

And after having the value of $\sigma^2$, just use the function randn() to generate your vector $\Delta$. For example with size N and $\sigma^2$ = sigma2, delta = randn(1,N) * sqrt(sigma2).