Using characters for indexing in 2019b
Show older comments
I am new to programming and was wondering how one would use text to input indexes for a matrix.
For example: I have this:
charr1 = ':,:,1,1,1,1,1,1';
XX = GridDo(XXInd);
and I want my output to use the indexing of charr1 to look like this:
XX = GridDo(:,:,1,1,1,1,1,1);
So that I can further automate my code.
Accepted Answer
More Answers (0)
Categories
Find more on Matrix Indexing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!