Find values in a vector or function
Given a desired value "y0", this function finds all the elements "y" in a vector whose values are the closest to "y0" in the whole vector, and also the positions "xi". So, the output is a set of points [xi,y0] given in two vectors, one for the values and another one for the positions.
The inputs are:
-Vector.
-Value that you want to find in the vector "y0".
The outputs are:
-The closest values to "y0" in the function (by means the real "y" values).
-The position "xi" of those "y" values.
I hope it is useful for all of you. If you have any suggestion, please, tell me.
Cita come
Adrian Lara-Quintanilla (2026). Find values in a vector or function (https://it.mathworks.com/matlabcentral/fileexchange/31103-find-values-in-a-vector-or-function), MATLAB Central File Exchange. Recuperato .
Compatibilità della release di MATLAB
Compatibilità della piattaforma
Windows macOS LinuxCategorie
Tag
Scopri Live Editor
Crea script con codice, output e testo formattato in un unico documento eseguibile.
| Versione | Pubblicato | Note della release | |
|---|---|---|---|
| 1.5 | toolbox |
|
|
| 1.4.0.0 | Yields the closest value in case that the wanted value is not in the range of the input vector |
||
| 1.3.0.0 | Little optimization |
||
| 1.1.0.0 | The algorithm remains being the same, but I have made some little changes.
|
||
| 1.0.0.0 |
