how create cell 1:10 vertical
9 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
aldo
am 12 Nov. 2023
Bearbeitet: John D'Errico
am 12 Nov. 2023
c={(1:10)'}
%but is not correct..i want to creare 1x10cell
0 Kommentare
Akzeptierte Antwort
Weitere Antworten (1)
John D'Errico
am 12 Nov. 2023
Bearbeitet: John D'Errico
am 12 Nov. 2023
There are always many ways to solve a problem. An easy way to create the cell array directly is to do this:
C1 = {1;2;3;4;5;6;7;8;9;10}
And, yes, that works nicely for a small array, but for a larger one you will want to use another tool. num2cell is a good choice, as suggested already. mat2cell will also work, but not quite as nicely.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Functions 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!