MATLAB Answers

Filtering by several criteria

1 view (last 30 days)
Hi!
How can I filter by several criteria like:
New=Salaries.Age_49((find(Salaries.Area==1)), (find(Salaries.Year==2019)))
This probably does not work with "find" but how can I do it?
Thank you!

  0 Comments

Sign in to comment.

Accepted Answer

Ameer Hamza
Ameer Hamza on 28 May 2020
Edited: Ameer Hamza on 28 May 2020
Something like this
New=Salaries.Age_49(Salaries.Area==1 & Salaries.Year==2019) % find is not necessary, logical indexing will work

  2 Comments

Külli Gutmann
Külli Gutmann on 28 May 2020
Thank you very much! :)
Ameer Hamza
Ameer Hamza on 28 May 2020
I am glad to be of help!!

Sign in to comment.

More Answers (0)

Tags

Products