Cell of character arrays

1 次查看(过去 30 天)
How to create a cell of character array of size 10*1 with first 5 rows containing 'cat' and next 5, 'dog'?
An example of this type of cell array can be found in MATLAB when 'fisheriris.mat' is located.
I am trying to create a cell similar to that of 'species' variable.
Please help me

采纳的回答

Vladimir Sovkov
Vladimir Sovkov 2019-12-8
S=cell(10,1);
S(1:5)={'cat'};
S(6:10)={'dog'};
  1 个评论
Pooja Patil
Pooja Patil 2019-12-8
Thank you very much for the response. It is really helpful.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Get Started with Statistics and Machine Learning Toolbox 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by