complete vlookup function - similar to Excel - both tab/mat

버전 1.0.0 (3.43 KB) 작성자: Andrea Pinto
A complete vlookup function, similar to MS Excel function, which works both with matrices and tables and with any type of lookupvalue.
다운로드 수: 75
업데이트 날짜: 2019/2/1

라이선스 보기

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

인용 양식

Andrea Pinto (2024). complete vlookup function - similar to Excel - both tab/mat (https://www.mathworks.com/matlabcentral/fileexchange/70168-complete-vlookup-function-similar-to-excel-both-tab-mat), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2018b
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Spreadsheets에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!
버전 게시됨 릴리스 정보
1.0.0