Info

此问题已关闭。 请重新打开它进行编辑或回答。

Import connected cell values into an array

1 次查看(过去 30 天)
Hey guys,
I am trying to import certain data from a 1756x2 cell array "aParts" into a vector. The cell array contains element numbers in one column and the related label in the second column. The purpose is to store every element with the same label in one vector.
What I have already done is to create an array where the indices for example for the label "Cavity" are stored.
Now i would like to export every element (from "aParts" column 1) where "aCavla" is 1 into a new vector. How can I do that?
Here is the code I got so far
for idx = 1:ilEle %Create Matrix with Elements and related label
aParts{idx,1}= (aElements(idx));
aParts{idx,2}= (aName(idx));
aCavla{idx}=strfind(aParts{idx,2},'Cavity');
end
ilEle is a the length of th cell array "aParts", so in this particular example it equals 1756.
Thanks in advance

回答(0 个)

此问题已关闭。

标签

Community Treasure Hunt

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

Start Hunting!

Translated by