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?

回答 (2 件)

Geoff Hayes
Geoff Hayes 2017 年 12 月 19 日

1 投票

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 2017 年 12 月 19 日
編集済み: Fangjun Jiang 2017 年 12 月 19 日

0 投票

s=cell(3,2);
s(:)={''}
ischar(s{3,1})

カテゴリ

ヘルプ センター および File ExchangeCharacters and Strings についてさらに検索

タグ

質問済み:

2017 年 12 月 19 日

回答済み:

2017 年 12 月 19 日

Community Treasure Hunt

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

Start Hunting!

Translated by