How to generate vector with non-linear spacing?
Hello,
I am attempting to generate an array with non-linear spacing between the elements but struggling to figure out a way to impliment this. I need an array x of points spaced from a real, negative value a to a real, positive value b. Ideally the spacing should follow a Gaussian distribution such that many points are clustered about x=0 in the vicinity of some finite width d. Conversely the spacing should be large at the boundaries. More generally it doesn’t have to be Gaussian but some guidance on a scheme where I can specify a length d<<|b-a| across which many points should be distributed would be really appreciated.
I tried to work out an algorithm of sorts from pen and paper but it didn’t really work and resulted in something that did not appear to be immediately solveable.
ThanksHello,
I am attempting to generate an array with non-linear spacing between the elements but struggling to figure out a way to impliment this. I need an array x of points spaced from a real, negative value a to a real, positive value b. Ideally the spacing should follow a Gaussian distribution such that many points are clustered about x=0 in the vicinity of some finite width d. Conversely the spacing should be large at the boundaries. More generally it doesn’t have to be Gaussian but some guidance on a scheme where I can specify a length d<<|b-a| across which many points should be distributed would be really appreciated.
I tried to work out an algorithm of sorts from pen and paper but it didn’t really work and resulted in something that did not appear to be immediately solveable.
Thanks Hello,
I am attempting to generate an array with non-linear spacing between the elements but struggling to figure out a way to impliment this. I need an array x of points spaced from a real, negative value a to a real, positive value b. Ideally the spacing should follow a Gaussian distribution such that many points are clustered about x=0 in the vicinity of some finite width d. Conversely the spacing should be large at the boundaries. More generally it doesn’t have to be Gaussian but some guidance on a scheme where I can specify a length d<<|b-a| across which many points should be distributed would be really appreciated.
I tried to work out an algorithm of sorts from pen and paper but it didn’t really work and resulted in something that did not appear to be immediately solveable.
Thanks array, vector MATLAB Answers — New Questions