strings function not available on MATLAB 2013

Since strings function was introduced in MATLAB 2016, how can one create a m by n array of empty strings in MATLAB 2013? Any suggestions?

Respuestas (2)

Geoff Hayes
Geoff Hayes el 19 de Dic. de 2017
Said - you could try something like
stringArray = repmat({''},10,2)
We use repmat to repeat copies of our cell array which has an empty string. In the above example, a 10x2 cell array of empty strings is created.
Fangjun Jiang
Fangjun Jiang el 19 de Dic. de 2017
Editada: Fangjun Jiang el 19 de Dic. de 2017
s=cell(3,2);
s(:)={''}
ischar(s{3,1})

Categorías

Más información sobre Characters and Strings en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 19 de Dic. de 2017

Respondida:

el 19 de Dic. de 2017

Community Treasure Hunt

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

Start Hunting!

Translated by