Are there any functions that will return the index of the last string in a cell of strings?

2 ビュー (過去 30 日間)
cell = {'a','a','b','b','c','c'}
function (cell, 'a') returns 2
function (cell, 'b') returns 4
function (cell, 'c') returns 6

採用された回答

David Hill
David Hill 2020 年 4 月 1 日
find(ismember(cell,'a'),1,'last');

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeData Types についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by