필터 지우기
필터 지우기

Sum of letters in matlab

조회 수: 25 (최근 30일)
googo
googo 2013년 4월 15일
Asumming that I have a string = 'abcd'
and i want to sum 'a' and 'b' to be z = 'ab'... i guess a(1)+a(2) won't work...
so how can i do it?
basic thing to do but i'm new in matlab and just started to learn about strings.

답변 (1개)

Walter Roberson
Walter Roberson 2013년 4월 15일
string(1:2)
or
[string(1), string(2)]
or
horzcat(string(1), string(2))

카테고리

Help CenterFile Exchange에서 Characters and Strings에 대해 자세히 알아보기

태그

아직 태그를 입력하지 않았습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by