I have a matrix that looks something like this:
struct with fields:
CD: [2×1 double]
CO: [4×1 double]
CV: [5×1 double]
LA: [7×1 double]
The Matrix A contains around 160 vectors that range from length 0 (empty) to length of 7.
Because I need to work with the values, in this case plot them and calculate mean, the vectors within the matrix need to have the same length.
How can I extend every vector to be the length of 7 and fill those new elements with NaNs?
It is important that the vectors keep their original name! Their order is not important.
I tried iterating through each matrix element, but could not get any further than this:
for idx = 1:numel(A)
element = A(i);