Pythonでは、次のようなことができます
the_weather_is = 'sunshiny'
bad_mood = {'dreary', 'drizzly', 'flawy', 'blustery', 'thundery'}
if the_weather_is in bad_mood:
print 'Stay at home...'
else:
print 'All fine...'
MATLAB に相当するものはどのように見えるでしょうか。つまり、文字列 (オプション) のリストがあり、それが にあるかどうかをチェックstring
しlist
ますか?
実際、MATLABでリストとして何を使用できるかさえわかりません。セルアレイ?