Of course, you don't need to hardcode anything.
If you really just want A:
[minval, maxval] = bounds(data.Test1(data.Type == 'A'))
However, you could obtain the max and min of all types at once. This may be more useful:
groupsummary(data, 'Type', {'max', 'min'})
1 Comment
Stephen Cobeldick (view profile)
Direct link to this comment
https://it.mathworks.com/matlabcentral/answers/467272-choosing-data-based-on-names#comment_715132
Sign in to comment.