How to make a column of elements in a cell array be empty cell elements??
15 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
George Vuong
am 30 Dez. 2015
Bearbeitet: Azzi Abdelmalek
am 30 Dez. 2015
Suppose I have a 4x4 cell array,
x = num2cell(rand(4));
And i would like to make the first column of elements be empty cells. How do I do that?? I do not want to delete the column, I just want each element in that column to be empty. I tried using the following:
x{:,4} = [];
but i get this error. The right hand side of this assignment has too few values to satisfy the left hand side.
0 Kommentare
Akzeptierte Antwort
Azzi Abdelmalek
am 30 Dez. 2015
Bearbeitet: Azzi Abdelmalek
am 30 Dez. 2015
x = [cell(4,1) num2cell(rand(4))]
Or maybe you want
x=num2cell(rand(4))
x(:,1)={[]}
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Cell Arrays 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!