元胞数组存的是类对象如何中求索引?。

1、obj.m_connections元胞数组:
2.里面的Throat类对象形式:
obj.m_connections是一个cell数组,里面存的是Throat类的对象,请问我如何得到某索引?
比如我现在拿到的是对象==obj.m_connections{3},我要将其在obj.m_connections查询一下,返回3,这个查询语句如何写?

 採用された回答

xebilen treeg
xebilen treeg 2023 年 3 月 30 日

0 投票

find([obj.m_connections{:}] == obj_test)

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeMATLAB についてさらに検索

タグ

質問済み:

2023 年 3 月 30 日

回答済み:

2023 年 3 月 30 日

Community Treasure Hunt

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

Start Hunting!

Translated by