matlab 如何在元胞数组cel​l中查找到某个元素的​位置要求输出行列。

2 ビュー (過去 30 日間)
mbpmwex
mbpmwex 2023 年 5 月 22 日
回答済み: pxxagcv 2023 年 5 月 22 日
matlab 如何在元胞数组cell中查找到某个元素的位置要求输出行列
比如
a{[1,2],[1,3] [1,4] [1,5] ;[2,2] [2,3],[2,4],[2,5]}
找出[1,3]的行列。帮帮忙,谢谢!

採用された回答

pxxagcv
pxxagcv 2023 年 5 月 22 日
b={[1,3]}
for i=1:2
for j=1:4
if isequal(a(i,j),b)
i
j
end
end
end

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMATLAB 快速入门 についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!