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 Exchange에서 Characters 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