How to assambly two cells without for loop ?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Ceren GURKAN
am 23 Jan. 2014
Bearbeitet: mohammed
am 23 Jan. 2014
Hello everybody,
I have an issue with the following: I have two cell arrays one is in a size of 24x1 (say UU1)and the other one is 8x1 (say UU2). I want to assamble these two in a third cell array with the size of 32x1 (say UU) without a for loop. It should look something like
UU{nodes1}=UU1; UU{nodes2}=UU2;
but could not do it :( Any help appreciated, thank you :)
3 Kommentare
mohammed
am 23 Jan. 2014
Bearbeitet: mohammed
am 23 Jan. 2014
i think you just need only last line i.e c=[a,b];
i thought you already have 2 cell uu1 and uu the cell as you told
"I have two cell arrays one is in a size of 24x1 (say UU1)and the other one is 8x1 (say UU2)"
c=[UU1,UU2];
if not please tell me about your variable...
Akzeptierte Antwort
Azzi Abdelmalek
am 23 Jan. 2014
Bearbeitet: Azzi Abdelmalek
am 23 Jan. 2014
n1=numel(uu1)
n2=numel(uu2)
Out=cell(1,n1+n2)
Out(1:n1)=uu1
Out(n1+1:n1+n2)=uu2
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Matrix Indexing finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!