フィルターのクリア

cut character from string

62 ビュー (過去 30 日間)
Abdulkareem
Abdulkareem 2014 年 1 月 31 日
編集済み: Amit 2014 年 1 月 31 日
hi i need to cut some characters from a string for example ss='bs15';
i need to split ss to ss1=bs ss2=15 i used strsplit but this function is undefined in my matlab (matlab R2012a)

採用された回答

Amit
Amit 2014 年 1 月 31 日
編集済み: Amit 2014 年 1 月 31 日
ss1 = ss(1:2);
ss2 = ss(3:4);
In matlab strings are vectors of type char. So you can use indexing.
  1 件のコメント
Amit
Amit 2014 年 1 月 31 日
編集済み: Amit 2014 年 1 月 31 日
and strsplit function is in 2013a and later. However, strsplit needs a delimiter or space to split strings!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeCharacters and Strings についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by