I have a vector S of structs s, each struct having a field x.
I would like to extract the vector X containing the value x from each struct in S.
Is there a way to do this with vectorization?
Example:
s1.x = 42;
s2.x = 87;
s3.x = 24;
S = [s1, s2, s3];
I want to get:
X = [42, 87, 24]
X = [S.x]?S.xbut was missing the enclosing square brackets.