complete vlookup function - similar to Excel - both tab/mat
This function should work as the vlookup function in Excel
vlookup looks for the 'look up value' in the 'luv-column'-th column of 'matrix_table' and return the corresponding 'mt_col'-th element of 'matrix_table' in the same row.
example:
matrix
1 2 3
4 5 6
7 8 9
luv = 6
[content,index] = vlookup(luv,matrix,3,1,0)
vlookup will look for the "luv" in the "matrix" in column 3 and will return the value in the same row in column 1 (4).
Legenda:
lookupvalue = can be any of the following types: [char / string / categorical / numeric / calendar duration / duration / datetime]
matrix_table = can be either a matrix or table
luv_col = can be any of the following types: [char / string / categorical / numeric / calendar duration / duration / datetime]
mt_col = can be any type
k = value to be shown in case the index is an empty vector
luv_col = 1 by default if omitted
k = [ ] by default if omitted
Copyright: andrea.pinto@studbocconi.it, 2019
Author: https://it.mathworks.com/matlabcentral/profile/authors/13958739-andrea-pinto
Cita come
Andrea Pinto (2025). complete vlookup function - similar to Excel - both tab/mat (https://it.mathworks.com/matlabcentral/fileexchange/70168-complete-vlookup-function-similar-to-excel-both-tab-mat), MATLAB Central File Exchange. Recuperato .
Compatibilità della release di MATLAB
Compatibilità della piattaforma
Windows macOS LinuxCategorie
Tag
Riconoscimenti
Ispirato da: vlookup - similar to MS Excel function
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Scopri Live Editor
Crea script con codice, output e testo formattato in un unico documento eseguibile.
| Versione | Pubblicato | Note della release | |
|---|---|---|---|
| 1.0.0 |
