Info

この質問は閉じられています。 編集または回答するには再度開いてください。

please suggest me the MATLAB expression to count the no of literals in a string

1 回表示 (過去 30 日間)
tina jain
tina jain 2015 年 4 月 6 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
e.g. I am having a string t6Pt4P2t3
then no of chars in it are 10. So I want a code which take utt6Pt4P2t3 as input and output me the 10(no of chrs) as output.

回答 (1 件)

Mahdiyar
Mahdiyar 2015 年 4 月 6 日
Hi Jain
The number of character in tis string (utt6Pt4P2t3) is 11 :) .You can use the following command.
String = 'utt6Pt4P2t3'
No_Char = length(String)
Regards,

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by