Hello all,
I was wondering if it possible to index the solution of a function once you are calling it. The output of the function is a vector and I want to obtain only the n-value of this output.
Example:
S = size(image) % eg. S, the size of the image could be [2046 1807 5]
S3 = S(3) % S3 = 5
What I was trying to do in one single line:
S3 = size(image)(3)
I have been running lately with the need of writing two lines of code instead of one in cases similar to this one. I am not aware of any way of writing this in one single line, but I hope that there is one, otherwise it would be practical to have it implemented.
PS: Suggestion for a better question title are welcome.
Daniel
Best Answer