Info

Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.

Import connected cell values into an array

4 Ansichten (letzte 30 Tage)
Brendan Görres
Brendan Görres am 1 Okt. 2020
Geschlossen: MATLAB Answer Bot am 20 Aug. 2021
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

Antworten (0)

Diese Frage ist geschlossen.

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by