vectorindex

Evaluate n-dimensional arrays at vectors of indices.
176 Downloads
Updated 14 Sep 2012

View License

VECTORINDEX evaluates an n-dimensional array at the indices specified in vector form. For example, if v=[1;3;1] and A is a 3-dimensional array, then vectorindex(A,v) is the same as A(1,3,1). The code utilizes linear indexing, but it is written for speed; all for loops are avoided. This is intended particularly for use with high-dimensional tensors, but will also work on vectors and matrices.

Cite As

Chad Lieberman (2024). vectorindex (https://www.mathworks.com/matlabcentral/fileexchange/38176-vectorindex), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2011a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Operators and Elementary Operations in Help Center and MATLAB Answers

Community Treasure Hunt

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

Start Hunting!
Version Published Release Notes
1.0.0.0