Sum of letters in matlab
25 ビュー (過去 30 日間)
古いコメントを表示
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.
0 件のコメント
回答 (1 件)
Walter Roberson
2013 年 4 月 15 日
string(1:2)
or
[string(1), string(2)]
or
horzcat(string(1), string(2))
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Characters and Strings についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!