Short answer: yes. Here is a MWE:
str1 = ["Test";"Test1";"42"]
str2 = ["new test";"pi = 3"]
C = {str1;str2}
ConCatStr = [C{1};C{2}];
This should answer the question regarding concatnation of string-arrays. Note that this is only possible with real strings (not with char-arrays). It is hard to tell, what you are doing beforehand as there are not details about getFilesFilt()
and mainFolderCUBX
.
EDIT MVE for the updated question
% function that returns a matrix
fnc = @(x)[x,1];
% anonymous function that returns a vector
fnc2 = @(x)reshape(fnc(x),2,1)
tmp = arrayfun(@(x)fnc(x), rand(10,1),'UniformOutput',false)
Answer: there is no proper way. However, you can do a little bit of fiddling and force everything into a single line (making the code ugly and less efficient)
tmp = arrayfun(@(x)fnc(x), rand(10,1),'UniformOutput',false);
out = reshape(cell2mat(tmp),numel(cell2mat(tmp)),1);
just replace the tmp
with what is written with it.