Permutations from two sets of files
Show older comments
HI, i am totally new to matlab i hope someone can help me achieving this. i have to text files, with a list of items ( long lists ), i want to read those lists in matlab, make a permuation between then, and save the result in new file.
exemple :

Accepted Answer
More Answers (1)
Azzi Abdelmalek
on 9 Nov 2014
a={1;2;3;4}
b={'A';'B';'C'}
[ii,jj]=ndgrid(1:numel(a),1:numel(b))
out=cellfun(@(x,y) [num2str(x) '-' y ],a(ii(:)),b(jj(:)),'un',0)
Categories
Find more on Large Files and Big Data in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!