extract data from cell array based on matching numbers with location in array

1 回表示 (過去 30 日間)
DavidL88
DavidL88 2020 年 8 月 24 日
編集済み: Stephen23 2020 年 8 月 24 日
Hi I have a cell array MyData which has 128x1 cells with data running sequentially from A1 to A32 and again for B1-B32, C1-C32 and D1-D32. Can anyone advise how I extract data from this array based on whether the location in this array matches that of a number? For example, if I have A how do I get the desired output B?
MyData = [sprintfc('A%i',1:32) sprintfc('B%i',1:32) sprintfc('C%i',1:32) sprintfc('D%i',1:32)]'
A = [1 34 68 92 118]'
B =[A1 B2 C4 C28 D22]

採用された回答

Stephen23
Stephen23 2020 年 8 月 24 日
編集済み: Stephen23 2020 年 8 月 24 日

その他の回答 (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