How to find all the values in a row that contains a certain value in a dataset?

1 view (last 30 days)
I have a 16740x9 dataset, and the fourth column in the dataset has a value of 4.3000. I want to find the values of the first three columns that share the same row with this value. I've tried commands like: [row] = find(mostrain == 4.3000)
row =
1
and
>> date = W(find(mostrain == 4.3000))
But I get errors like: Error using dataset/subsrefParens (line 9) Dataset array subscripts must be two-dimensional.
Error in dataset/subsref (line 69) [varargout{1:nargout}] = subsrefParens(a,s);
And
>> date = mostrain(row)
date =
4.3000
>> [a b]=find(W == 4.3000); Undefined operator '==' for input arguments of type 'dataset'.
>> date = W(mostrain) Error using dataset/subsrefParens (line 9) Dataset array subscripts must be two-dimensional.
Error in dataset/subsref (line 69) [varargout{1:nargout}] = subsrefParens(a,s);
... So how would I do it?

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!