string to array and then getting the first value of the array

I am trying to write a code that has a user input a string (in this case Yes).
This string then needs to be convereted to an array so that I can get the first value of said array. (i.e the Y.)
This is what I have so far.
solid = input('Is it a solid color?:' , 's');
If someone can point me in the right direction it would be greatly appriciated.

 採用された回答

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeCharacters and Strings についてさらに検索

製品

リリース

R2022a

タグ

質問済み:

2022 年 10 月 6 日

回答済み:

2022 年 10 月 6 日

Community Treasure Hunt

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

Start Hunting!

Translated by