필터 지우기
필터 지우기

About array and string

조회 수: 1 (최근 30일)
Yoga Arviansyah
Yoga Arviansyah 2018년 9월 24일
답변: Joel Meyer Espinoza 2018년 9월 24일
How to input some strings to an array for example if i type aa then bb then cc so i will have variable A=( aa bb cc)
Please don't delete this i really need the answer....

답변 (2개)

Steven Lord
Steven Lord 2018년 9월 24일
Since you've indicated you're using release R2012a, the string data type introduced in release R2016b isn't an option for you. [If upgrading is an option, I would recommend doing so as that would let you use string.]
So you're going to need to make either a char array or a cell array containing char vectors. Search your locally installed documentation for the three word phrase "Creating Character Arrays" and read the first two hits for information on how to use each of these two techniques.

Joel Meyer Espinoza
Joel Meyer Espinoza 2018년 9월 24일
not sure if this is what you asked for use strcat https://de.mathworks.com/help/matlab/ref/strcat.html
for example a='Hello'; b=' World'; s = strcat(a,b)

카테고리

Help CenterFile Exchange에서 Matrix Indexing에 대해 자세히 알아보기

태그

제품


릴리스

R2012a

Community Treasure Hunt

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

Start Hunting!

Translated by