vind2sub
Version 1.0.0.0 (1.64 KB) by
Chris
MATLAB's ind2sub function implemented to return a variable length vector
When calling [i1 i2 ... iN] = ind2sub(siz, IND), one declares the variables i1:iN in advance. When working within loops with variable sized arrays, if the array size is not known ahead of time, or for a large N, this can be a nuisance. Rather than having to capture multiple discrete indices, this implementation dynamically creates and returns a single vector of INDICES where length(INDICES)==N.
Cite As
Chris (2024). vind2sub (https://www.mathworks.com/matlabcentral/fileexchange/45414-vind2sub), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Created with
R2013a
Compatible with any release
Platform Compatibility
Windows macOS LinuxCategories
Find more on Matrices and Arrays in Help Center and MATLAB Answers
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
Version | Published | Release Notes | |
---|---|---|---|
1.0.0.0 |