Inverse a non-linear linspace

5 visualizaciones (últimos 30 días)
unkown character
unkown character el 24 de Sept. de 2018
Comentada: Adam Danz el 24 de Sept. de 2018
Hi,
I have the following code to get a normally distributed vector of 15 points between -20 and 20:
x_coor = linspace(-1,1,15);
mu = 0;
sigma = 0.5;
x = normcdf(x_coor, mu, sigma) ;
x = x * 40;
x = x - 20;
the output is as following:
Columns 1 through 11
-19.0900 -18.2705 -16.9375 -14.9380 -12.1727 -8.6458 -4.4981 0 4.4981 8.6458 12.1727
Columns 12 through 15
14.9380 16.9375 18.2705 19.0900
how can i invert this such that it would be something like:
-19.09 14 10 8 6 ...
so that it has more values around 0 rather than around plusminus 20?
  2 comentarios
ANKUR KUMAR
ANKUR KUMAR el 24 de Sept. de 2018
What exactly you wish to do. Tell us in detail might helps you to get the required answer. Tell us what you are expecting the answer clearly.
Adam Danz
Adam Danz el 24 de Sept. de 2018
I agree, your goal is very unclear. Plotting x as a function of x_coor reveals a sigmoidal curve. Maybe you could describe how you'd like that sigmoid to change.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Creating and Concatenating Matrices en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by