I am trying to etract certain data from a matrix into a single row vector with the length of the vector depending on the number of elements in the atrix.
So for example I extracted successfully the element numbers that represents one building component with the following code:
The result "cavity" I get is attached to this question. What I want is the loop to stop, before filling out the rows with "1" and give out a vector that has the length of the number of elements that belong to one part (in this case to the part cavity). How can I do that?