Info

This question is closed. Reopen it to edit or answer.

how can we know the index of this data? for example,i want know index of H2O

1 view (last 30 days)
species=['O2','H2O','CO2')

Answers (1)

Bob Thompson
Bob Thompson on 23 Jul 2019
I would suggest using strfind to look up a string.
result = strfind(species,'H2O');

Tags

Community Treasure Hunt

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

Start Hunting!