Store and update the size of a vector after every loop
Mostra commenti meno recenti
Hello everyone! I have a cell array witch is called "Mixed_Prop" and its dimension is 1x19x36 but every double array has a different dimension. For example, the element Mixed_Prop{1,1,1} is a 14x1 vector, but Mixed_Prop{1,1,2} is a 16x1 vector. I would like to store all these values into a new vector and update every time its size. The final outcome should look like that: Vector = [Mixed_Prop{1,1,1};Mixed_Prop{1,1,2};....]. My code is as seems below and obviously does not work. However, if i run it manually it works perfectly. For instance, "Vector_ch01 = cell2mat(Mixed_Prop(1,1,1))" creates a vector with the desired values. Thank you in advance
for kk = 1:35
Vector_ch01(:,1) = cell2mat(Mixed_Prop(1,1,kk));
end
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Matrix Indexing in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!