When trying to get the position of an item returned by a function in MATLAB, I always need two rows of code.
For example, I currently do this:
testString = 'Hello!';
strSize = size(testString); % returns two dimensions: [1,6]
strSize = strSize(2); % returns one dimension: 6
But, I'd like to do this, as possible in Javascript:
testString = 'Hello!';
strSize = size(testString)(2); % returns one dimension: 6
Is there any trick in MATLAB to get the return of the 'size' function and, in the same row, ask for a specific position in the array?
Thanks, colleagues!