Populating an array with a vairable-output function
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Gabriel Stanley
le 21 Mai 2021
Modifié(e) : Gabriel Stanley
le 24 Mai 2021
How can I concatenate the outputs of a function together, when the size of the output varies? E.g.
fileBatch = {'File1','File2','...FileN'}
for f = 1:length(fileBatch)
OutputInformationTable(:,:,f) = fcn(fileBtach(f))
end
where the array returned by fcn could be 1x10, 3x12, etc. My current implementation throws a fault if the size of the returned array changes across iterations of the loop (even if the second iteration returns a smaller array). I do not have enough knoweldge about the files to pre-allocate the OutputInformationTable array.
0 commentaires
Réponse acceptée
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Logical dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!